tawasuyu

tawasuyu/taffy

A high performance rust-powered UI layout library

HTML 5544Rust 88Markdown 11TOML 91926 Definitions

Fix `Vec` is not imported in float (#931)

* Fix `Vec` is not imported in float

* use `debug_log` macro

* fix `debug_log` use

f9514f6852b0a1a3869a98b688156b584728be4a · by Kane Wang · (7 months ago) · parent 60601a657 · browse the tree at this commit

Semantic delta · 1

src/compute/float.rs

1 files · +3 −3

diff --git a/src/compute/float.rs b/src/compute/float.rs
index 0a27ebe9d..e565ac0e5 100644
--- a/src/compute/float.rs
+++ b/src/compute/float.rs
@@ -28,7 +28,7 @@
 
 use core::ops::Range;
 
-use crate::{AvailableSpace, Clear, FloatDirection, Point, Size};
+use crate::{debug::debug_log, sys::Vec, AvailableSpace, Clear, FloatDirection, Point, Size};
 
 /// An empty "slot" that avoids floats that is suitable for non-floated content
 /// to be laid out into
@@ -208,8 +208,8 @@ impl FloatContext {
         let old_segment = &mut self.segments[idx];
         let new_segment = Segment { insets: old_segment.insets, y: divide_at_y..old_segment.y.end };
         if !old_segment.y.contains(&divide_at_y) || old_segment.y.start == divide_at_y {
-            dbg!(&old_segment);
-            dbg!(divide_at_y);
+            debug_log!("old_segment", dbg:&mut *old_segment);
+            debug_log!("divide_at_y", dbg:divide_at_y);
             assert!(old_segment.y.contains(&divide_at_y) && old_segment.y.start != divide_at_y);
         }
         old_segment.y.end = divide_at_y;