Skip to content

Commit

Permalink
Fix a couple of clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-thompson committed Jan 7, 2024
1 parent 4fac60e commit 4488143
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ impl GuidanceField {
fn get(&self, pos: &Vec2) -> i32 {
let (w, h) = self.image.dimensions();
let shift = Vec2::new(w as f32 * 0.5, h as f32 * 0.5);
let pos = shift + pos.clone();
let pos = shift + *pos;

if (pos.y as u32) < h {
let x = pos.x as u32;
Expand All @@ -173,7 +173,7 @@ fn generate_guidance_field(
for event in map_events.read() {
match event {
AssetEvent::Added { id } => {
if let Some(map) = maps.get(id.clone()) {
if let Some(map) = maps.get(*id) {
commands.insert_resource(
GuidanceField::from_map(&map.map)
.expect("Track cannot be converted to GuidanceField"),
Expand Down

0 comments on commit 4488143

Please sign in to comment.