diff --git a/src/data.rs b/src/data.rs index f07ef48..ea3074f 100644 --- a/src/data.rs +++ b/src/data.rs @@ -207,7 +207,7 @@ fn load_data( to_remove: Query, With, With)>>, ) { let custom_asset = if let Some(reac_handle) = &state.reaction_data { - if let Some(bevy::asset::LoadState::Failed) = asset_server.get_load_state(&*reac_handle) { + if let Some(bevy::asset::LoadState::Failed) = asset_server.get_load_state(reac_handle) { info_state .notify("Failed loading data! Check if your metabolism.json is in correct format."); state.reaction_data = None; diff --git a/src/gui.rs b/src/gui.rs index 8348ab7..84df81a 100644 --- a/src/gui.rs +++ b/src/gui.rs @@ -550,8 +550,8 @@ fn follow_mouse_on_drag_ui( }; if let Some(screen_pos) = win.cursor_position() { // arbitrary offset to make it feel more natural - style.left = Val::Px(screen_pos.x - 80. * ui_scale.0 as f32); - style.bottom = Val::Px(screen_pos.y - 50. * ui_scale.0 as f32); + style.left = Val::Px(screen_pos.x - 80. * ui_scale.0); + style.bottom = Val::Px(screen_pos.y - 50. * ui_scale.0); } } } diff --git a/src/screenshot.rs b/src/screenshot.rs index 8844bca..a3d90bf 100644 --- a/src/screenshot.rs +++ b/src/screenshot.rs @@ -331,11 +331,10 @@ fn save_svg_file( // undo the scaling done on the whole SVG only for the legend .push_group( legend_nodes, - roarsvg::SvgTransform::from_scale(ui_scale.0 as f32, -ui_scale.0 as f32) - .post_translate( - legend_trans.translation().x, - legend_trans.translation().y, - ), + roarsvg::SvgTransform::from_scale(ui_scale.0, -ui_scale.0).post_translate( + legend_trans.translation().x, + legend_trans.translation().y, + ), ) .unwrap(); }