Skip to content

Commit

Permalink
replace clone with copy
Browse files Browse the repository at this point in the history
  • Loading branch information
frewsxcv committed Feb 29, 2024
1 parent 01cffe5 commit 0b6019a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rgis-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ static DEFAULT_MSAA: &str = "4";

type MsaaSampleCount = u32;

#[derive(Clone, Resource)]
#[derive(Copy, Clone, Resource)]
pub struct Values {
pub msaa_sample_count: MsaaSampleCount,
}
Expand All @@ -39,10 +39,11 @@ pub fn run() -> Result<Values, String> {
})
}

#[derive(Copy, Clone, Resource)]
pub struct Plugin(pub Values);

impl bevy::app::Plugin for Plugin {
fn build(&self, app: &mut bevy::app::App) {
app.insert_resource(self.0.clone());
app.insert_resource(self.0);
}
}

0 comments on commit 0b6019a

Please sign in to comment.