Skip to content

Commit

Permalink
#51. avoid cloning
Browse files Browse the repository at this point in the history
  • Loading branch information
wtholliday committed Aug 19, 2023
1 parent a469264 commit 9dc981e
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/views/canvas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,10 @@ where
}

fn layout(&self, path: &mut IdPath, args: &mut LayoutArgs) -> LocalSize {
args.cx.layout.insert(
path.clone(),
LayoutBox {
rect: LocalRect::new(LocalPoint::zero(), args.sz),
offset: LocalOffset::zero(),
},
);
args.cx.update_layout(path, LayoutBox {
rect: LocalRect::new(LocalPoint::zero(), args.sz),
offset: LocalOffset::zero(),
});
args.sz
}

Expand Down

0 comments on commit 9dc981e

Please sign in to comment.