tawasuyu

tawasuyu/taffy

A high performance rust-powered UI layout library

HTML 5544Rust 88Markdown 11TOML 91926 Definiciones

Updated border_and_padding.rs - changed '.ok()' into '.unwrap()' (#493)

46546b26777ca14669ba079a307f9c0b5d9a8854 · por Yurii Nakonechnyi · (hace 3 años) · padre 0ade1dab2 · ver el árbol en este commit

Delta semántico · 4

1 archivos · +4 −4

diff --git a/tests/border_and_padding.rs b/tests/border_and_padding.rs
index 6ada8f01b..a587ce7e2 100644
--- a/tests/border_and_padding.rs
+++ b/tests/border_and_padding.rs
@@ -26,7 +26,7 @@ fn border_on_a_single_axis_doesnt_increase_size() {
                 node,
                 Size { width: AvailableSpace::Definite(100.0), height: AvailableSpace::Definite(100.0) },
             )
-            .ok();
+            .unwrap();
 
         let layout = taffy.layout(node).unwrap();
         assert_eq!(layout.size.width * layout.size.height, 0.);
@@ -54,7 +54,7 @@ fn padding_on_a_single_axis_doesnt_increase_size() {
                 node,
                 Size { width: AvailableSpace::Definite(100.0), height: AvailableSpace::Definite(100.0) },
             )
-            .ok();
+            .unwrap();
 
         let layout = taffy.layout(node).unwrap();
         assert_eq!(layout.size.width * layout.size.height, 0.);
@@ -78,7 +78,7 @@ fn border_and_padding_on_a_single_axis_doesnt_increase_size() {
                 node,
                 Size { width: AvailableSpace::Definite(100.0), height: AvailableSpace::Definite(100.0) },
             )
-            .ok();
+            .unwrap();
         let layout = taffy.layout(node).unwrap();
         assert_eq!(layout.size.width * layout.size.height, 0.);
     }
@@ -98,7 +98,7 @@ fn vertical_border_and_padding_percentage_values_use_available_space_correctly()
 
     taffy
         .compute_layout(node, Size { width: AvailableSpace::Definite(200.0), height: AvailableSpace::Definite(100.0) })
-        .ok();
+        .unwrap();
 
     let layout = taffy.layout(node).unwrap();
     assert_eq!(layout.size.width, 200.0);