Skip to content

Commit

Permalink
janitor: Derive some Default traits
Browse files Browse the repository at this point in the history
  • Loading branch information
hunger committed Jan 4, 2022
1 parent 23badd9 commit 06346ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
11 changes: 1 addition & 10 deletions sixtyfps_runtime/interpreter/dynamic_component.rs
Expand Up @@ -178,6 +178,7 @@ impl Component for ErasedComponentBox {

sixtyfps_corelib::ComponentVTable_static!(static COMPONENT_BOX_VT for ErasedComponentBox);

#[derive(Default)]
pub(crate) struct ComponentExtraData {
pub(crate) globals: HashMap<String, Pin<Rc<dyn crate::global_component::GlobalComponent>>>,
pub(crate) self_weak:
Expand All @@ -186,16 +187,6 @@ pub(crate) struct ComponentExtraData {
pub(crate) embedded_file_resources: HashMap<usize, String>,
}

impl Default for ComponentExtraData {
fn default() -> Self {
Self {
globals: HashMap::new(),
self_weak: Default::default(),
embedded_file_resources: Default::default(),
}
}
}

struct ErasedRepeaterWithinComponent<'id>(RepeaterWithinComponent<'id, 'static>);
impl<'id, 'sub_id> From<RepeaterWithinComponent<'id, 'sub_id>>
for ErasedRepeaterWithinComponent<'id>
Expand Down
6 changes: 1 addition & 5 deletions sixtyfps_runtime/rendering_backends/testing/lib.rs
Expand Up @@ -90,13 +90,9 @@ impl sixtyfps_corelib::backend::Backend for TestingBackend {
}
}

#[derive(Default)]
pub struct TestingWindow {}

impl Default for TestingWindow {
fn default() -> Self {
Self {}
}
}
impl PlatformWindow for TestingWindow {
fn show(self: Rc<Self>) {
unimplemented!("showing a testing window")
Expand Down

0 comments on commit 06346ab

Please sign in to comment.