diff --git a/crates/build/re_types_builder/src/codegen/fbs/mod.rs b/crates/build/re_types_builder/src/codegen/fbs/mod.rs index 48b24d7c3350a..70ce5c829ed98 100644 --- a/crates/build/re_types_builder/src/codegen/fbs/mod.rs +++ b/crates/build/re_types_builder/src/codegen/fbs/mod.rs @@ -18,7 +18,7 @@ impl FbsCodeGenerator { } fn add_include_for( - &mut self, + &self, reporter: &crate::Reporter, files_to_write: &mut std::collections::BTreeMap, directory: &str, diff --git a/crates/store/re_entity_db/src/entity_db.rs b/crates/store/re_entity_db/src/entity_db.rs index e9132f9b2b8a7..a9f07d89a292b 100644 --- a/crates/store/re_entity_db/src/entity_db.rs +++ b/crates/store/re_entity_db/src/entity_db.rs @@ -834,7 +834,7 @@ impl IngestionStatistics { } } - fn on_new_row_id(&mut self, row_id: RowId) { + fn on_new_row_id(&self, row_id: RowId) { if let Ok(duration_since_epoch) = web_time::SystemTime::UNIX_EPOCH.elapsed() { let nanos_since_epoch = duration_since_epoch.as_nanos() as u64; diff --git a/crates/store/re_video/src/decode/ffmpeg_h264/ffmpeg.rs b/crates/store/re_video/src/decode/ffmpeg_h264/ffmpeg.rs index 6e2ea0de05f58..3f8775ab8005a 100644 --- a/crates/store/re_video/src/decode/ffmpeg_h264/ffmpeg.rs +++ b/crates/store/re_video/src/decode/ffmpeg_h264/ffmpeg.rs @@ -364,7 +364,7 @@ impl FFmpegProcessAndListener { } } - fn end_of_video(&mut self) { + fn end_of_video(&self) { // Close stdin. That will let ffmpeg know that it should flush its buffers. self.frame_data_tx.send(FFmpegFrameData::Quit).ok(); } diff --git a/crates/utils/re_case/src/lib.rs b/crates/utils/re_case/src/lib.rs index 14e8d4b33ce3a..7362a1a8e2f83 100644 --- a/crates/utils/re_case/src/lib.rs +++ b/crates/utils/re_case/src/lib.rs @@ -23,7 +23,7 @@ pub fn to_snake_case(s: &str) -> String { .replace("UVec", "uvec") .replace("DVec", "dvec") .replace("UInt", "uint"); - *last = rerun_snake.convert(&last); + *last = rerun_snake.convert(last); } parts.join(".") } diff --git a/crates/viewer/re_renderer/src/video/chunk_decoder.rs b/crates/viewer/re_renderer/src/video/chunk_decoder.rs index da951c917a569..978229a579382 100644 --- a/crates/viewer/re_renderer/src/video/chunk_decoder.rs +++ b/crates/viewer/re_renderer/src/video/chunk_decoder.rs @@ -101,7 +101,7 @@ impl VideoChunkDecoder { /// Returns [`VideoPlayerError::EmptyBuffer`] if the internal buffer is empty, /// which it is just after startup or after a call to [`Self::reset`]. pub fn update_video_texture( - &mut self, + &self, render_ctx: &RenderContext, video_texture: &mut VideoTexture, presentation_timestamp: Time, @@ -168,7 +168,7 @@ impl VideoChunkDecoder { } /// Return and clear the latest error that happened during decoding. - pub fn take_error(&mut self) -> Option { + pub fn take_error(&self) -> Option { self.decoder_output.lock().error.take() } } diff --git a/crates/viewer/re_renderer_examples/multiview.rs b/crates/viewer/re_renderer_examples/multiview.rs index af74feb01fc03..c7dc7ac1ca77b 100644 --- a/crates/viewer/re_renderer_examples/multiview.rs +++ b/crates/viewer/re_renderer_examples/multiview.rs @@ -218,7 +218,7 @@ fn handle_incoming_screenshots(re_ctx: &RenderContext) { impl Multiview { fn draw_view( - &mut self, + &self, re_ctx: &RenderContext, target_cfg: TargetConfiguration, skybox: GenericSkyboxDrawData, diff --git a/crates/viewer/re_selection_panel/src/selection_history_ui.rs b/crates/viewer/re_selection_panel/src/selection_history_ui.rs index 337922e9f6fbe..c44e7dcdd0d9f 100644 --- a/crates/viewer/re_selection_panel/src/selection_history_ui.rs +++ b/crates/viewer/re_selection_panel/src/selection_history_ui.rs @@ -120,7 +120,7 @@ impl SelectionHistoryUi { #[allow(clippy::unused_self)] fn history_item_ui( - &mut self, + &self, blueprint: &ViewportBlueprint, ui: &mut egui::Ui, index: usize, diff --git a/crates/viewer/re_time_panel/src/time_control_ui.rs b/crates/viewer/re_time_panel/src/time_control_ui.rs index 3729c62852ef8..7d9db28381aea 100644 --- a/crates/viewer/re_time_panel/src/time_control_ui.rs +++ b/crates/viewer/re_time_panel/src/time_control_ui.rs @@ -177,7 +177,7 @@ You can also define your own timelines, e.g. for sensor time or camera frame num } #[allow(clippy::unused_self)] - fn loop_button_ui(&mut self, time_control: &mut TimeControl, ui: &mut egui::Ui) { + fn loop_button_ui(&self, time_control: &mut TimeControl, ui: &mut egui::Ui) { let icon = &re_ui::icons::LOOP; ui.scope(|ui| { diff --git a/crates/viewer/re_ui/src/modal.rs b/crates/viewer/re_ui/src/modal.rs index ba8048e15a01c..49d10b65eee0a 100644 --- a/crates/viewer/re_ui/src/modal.rs +++ b/crates/viewer/re_ui/src/modal.rs @@ -158,7 +158,7 @@ impl Modal { /// /// Typically called by [`ModalHandler::ui`]. pub fn ui( - &mut self, + &self, ctx: &egui::Context, content_ui: impl FnOnce(&mut egui::Ui, &mut bool) -> R, ) -> ModalResponse { diff --git a/crates/viewer/re_viewer/src/app.rs b/crates/viewer/re_viewer/src/app.rs index 42259a0af26b9..ff8e24f4bffbc 100644 --- a/crates/viewer/re_viewer/src/app.rs +++ b/crates/viewer/re_viewer/src/app.rs @@ -983,7 +983,7 @@ impl App { }); } - fn egui_debug_panel_ui(&mut self, ui: &mut egui::Ui) { + fn egui_debug_panel_ui(&self, ui: &mut egui::Ui) { let egui_ctx = ui.ctx().clone(); egui::SidePanel::left("style_panel") diff --git a/crates/viewer/re_viewer/src/ui/rerun_menu.rs b/crates/viewer/re_viewer/src/ui/rerun_menu.rs index 5a051ea71ddd5..762fcbad5f4ed 100644 --- a/crates/viewer/re_viewer/src/ui/rerun_menu.rs +++ b/crates/viewer/re_viewer/src/ui/rerun_menu.rs @@ -163,7 +163,7 @@ impl App { } } - fn save_buttons_ui(&mut self, ui: &mut egui::Ui, store_ctx: Option<&StoreContext<'_>>) { + fn save_buttons_ui(&self, ui: &mut egui::Ui, store_ctx: Option<&StoreContext<'_>>) { use re_ui::UICommandSender; let file_save_in_progress = self.background_tasks.is_file_save_in_progress();