summaryrefslogtreecommitdiff
path: root/src/library/flow.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-01-31 16:06:44 +0100
committerLaurenz <laurmaedje@gmail.com>2022-01-31 16:47:00 +0100
commit20b1a38414101f842a6d9201133a5aaaa45a7cec (patch)
tree2365453d4dfdebfa11d618baad1a36c65b62d7c7 /src/library/flow.rs
parentfa57d86ed981373b66804972147bf59cab920e6b (diff)
Switch from `Rc` to `Arc`
Diffstat (limited to 'src/library/flow.rs')
-rw-r--r--src/library/flow.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/library/flow.rs b/src/library/flow.rs
index 3405b04a..95426731 100644
--- a/src/library/flow.rs
+++ b/src/library/flow.rs
@@ -18,7 +18,7 @@ impl Layout for FlowNode {
ctx: &mut LayoutContext,
regions: &Regions,
styles: StyleChain,
- ) -> Vec<Constrained<Rc<Frame>>> {
+ ) -> Vec<Constrained<Arc<Frame>>> {
FlowLayouter::new(self, regions.clone()).layout(ctx, styles)
}
}
@@ -72,7 +72,7 @@ struct FlowLayouter<'a> {
/// Spacing and layouted nodes.
items: Vec<FlowItem>,
/// Finished frames for previous regions.
- finished: Vec<Constrained<Rc<Frame>>>,
+ finished: Vec<Constrained<Arc<Frame>>>,
}
/// A prepared item in a flow layout.
@@ -82,9 +82,9 @@ enum FlowItem {
/// Fractional spacing between other items.
Fractional(Fractional),
/// A frame for a layouted child node and how to align it.
- Frame(Rc<Frame>, Spec<Align>),
+ Frame(Arc<Frame>, Spec<Align>),
/// An absolutely placed frame.
- Placed(Rc<Frame>),
+ Placed(Arc<Frame>),
}
impl<'a> FlowLayouter<'a> {
@@ -113,7 +113,7 @@ impl<'a> FlowLayouter<'a> {
mut self,
ctx: &mut LayoutContext,
styles: StyleChain,
- ) -> Vec<Constrained<Rc<Frame>>> {
+ ) -> Vec<Constrained<Arc<Frame>>> {
for styled in self.children {
let styles = styled.map.chain(&styles);
match styled.item {