mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-02 06:20:48 +01:00
Move tool: clippy fixes in the group lock tests (#18138)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
d2595e20b5
commit
e8ba9ef235
1 file changed
+7
-2
@@ -36,7 +36,12 @@ fn group_of_two() -> (Box<PhotocraftApp>, LayerId, LayerId) {
|
||||
}
|
||||
|
||||
fn set_locks(app: &mut PhotocraftApp, id: LayerId, f: impl Fn(&mut photocraft_doc::Locks)) {
|
||||
app.session.edit("lock", |doc, _| Ok(f(&mut doc.layer_mut(id).unwrap().locks))).unwrap();
|
||||
app.session
|
||||
.edit("lock", |doc, _| {
|
||||
f(&mut doc.layer_mut(id).unwrap().locks);
|
||||
Ok(())
|
||||
})
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
/// The messages of the alerts left open, which are then closed.
|
||||
@@ -118,7 +123,7 @@ fn unmeasured_locks_inside_the_group_keep_moving() {
|
||||
.edit("nest", |doc, _| {
|
||||
let mut inner = doc.remove(g2).unwrap();
|
||||
inner.locks.position = true;
|
||||
let LayerContent::Group(g) = &mut doc.layer_mut(group).unwrap().content else { unreachable!() };
|
||||
let LayerContent::Group(g) = &mut doc.layer_mut(group).unwrap().content else { panic!("G is a group") };
|
||||
g.children.push(Layer::new("inner", LayerContent::Group(Group { children: vec![inner], expanded: true, artboard: None, frame_stroke: None })));
|
||||
Ok(())
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user