Skip to content

Commit 0876f67

Browse files
committed
fixed tests + clippy warnings
1 parent 5eebd7a commit 0876f67

2 files changed

Lines changed: 9 additions & 17 deletions

File tree

‎editor/src/world/create.rs‎

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -625,18 +625,14 @@ impl EntityCreator {
625625
scene_path,
626626
)
627627
{
628-
match self.mode {
629-
EntityCreatorMode::CreateChild => {
630-
let sub_graph = ui_scene.ui.take_reserve_sub_graph(ui_node_handle);
631-
let parent = if let Some(selection) = editor_selection.as_ui() {
632-
selection.widgets.first().cloned().unwrap_or_default()
633-
} else {
634-
Handle::NONE
635-
};
636-
sender.do_command(AddWidgetCommand::new(sub_graph, parent, true));
637-
}
638-
// The rest is unsupported.
639-
_ => (),
628+
if let EntityCreatorMode::CreateChild = self.mode {
629+
let sub_graph = ui_scene.ui.take_reserve_sub_graph(ui_node_handle);
630+
let parent = if let Some(selection) = editor_selection.as_ui() {
631+
selection.widgets.first().cloned().unwrap_or_default()
632+
} else {
633+
Handle::NONE
634+
};
635+
sender.do_command(AddWidgetCommand::new(sub_graph, parent, true));
640636
}
641637
}
642638
}

‎fyrox-core-derive/tests/it/reflect.rs‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,7 @@ fn doc_comments() {
7575
hidden: 0,
7676
};
7777
s.fields_ref(&mut |infos| {
78-
assert_eq!(
79-
infos[0].doc,
80-
" This is a \
81-
multiline doc comment."
82-
);
78+
assert_eq!(infos[0].doc, " This is a\n multiline doc comment.\n");
8379
});
8480
assert_eq!(s.type_info_ref().doc_comment, " Struct doc comment.");
8581
}

0 commit comments

Comments
 (0)