diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-01-31 16:06:44 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-01-31 16:47:00 +0100 |
| commit | 20b1a38414101f842a6d9201133a5aaaa45a7cec (patch) | |
| tree | 2365453d4dfdebfa11d618baad1a36c65b62d7c7 /src/layout/constraints.rs | |
| parent | fa57d86ed981373b66804972147bf59cab920e6b (diff) | |
Switch from `Rc` to `Arc`
Diffstat (limited to 'src/layout/constraints.rs')
| -rw-r--r-- | src/layout/constraints.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/layout/constraints.rs b/src/layout/constraints.rs index 0d772cea..3bdbc4bc 100644 --- a/src/layout/constraints.rs +++ b/src/layout/constraints.rs @@ -1,4 +1,4 @@ -use std::rc::Rc; +use std::sync::Arc; use super::Regions; use crate::frame::Frame; @@ -7,12 +7,12 @@ use crate::geom::{Length, Size, Spec}; /// Constrain a frame with constraints. pub trait Constrain { /// Reference-count the frame and wrap it with constraints. - fn constrain(self, cts: Constraints) -> Constrained<Rc<Frame>>; + fn constrain(self, cts: Constraints) -> Constrained<Arc<Frame>>; } impl Constrain for Frame { - fn constrain(self, cts: Constraints) -> Constrained<Rc<Frame>> { - Constrained::new(Rc::new(self), cts) + fn constrain(self, cts: Constraints) -> Constrained<Arc<Frame>> { + Constrained::new(Arc::new(self), cts) } } |
