Delta semántico · 2
src/id.rs
- cambió por dentro fn new pub
diff --git a/src/algo.rs b/src/algo.rs
index 567dcdbcb..958fa48e2 100644
--- a/src/algo.rs
+++ b/src/algo.rs
@@ -353,7 +353,7 @@ impl Forest {
// webkit handled various scenarios. Can probably be solved better by passing in
// min-content max-content constraints from the top
let min_main = self
- .compute_internal(child.node, Size { width: Undefined, height: Undefined }, available_space, false)
+ .compute_internal(child.node, Size::undefined(), available_space, false)
.size
.main(dir)
.maybe_max(child.min_size.main(dir))
@@ -600,7 +600,7 @@ impl Forest {
let min_main = if is_row && self.nodes[child.node].measure.is_none() {
self.compute_internal(
child.node,
- Size { width: Undefined, height: Undefined },
+ Size::undefined(),
available_space,
false,
)
diff --git a/src/id.rs b/src/id.rs
index 7da241348..154d1f87d 100644
--- a/src/id.rs
+++ b/src/id.rs
@@ -16,7 +16,7 @@ pub(crate) struct Allocator {
impl Allocator {
pub const fn new() -> Self {
- Allocator { new_id: atomic::AtomicUsize::new(0) }
+ Self { new_id: atomic::AtomicUsize::new(0) }
}
pub fn allocate(&self) -> Id {