diff --git a/.github/workflows/deploy_web_demo.yml b/.github/workflows/deploy_web_demo.yml index ea2956db313..41203da390b 100644 --- a/.github/workflows/deploy_web_demo.yml +++ b/.github/workflows/deploy_web_demo.yml @@ -43,7 +43,7 @@ jobs: with: profile: minimal target: wasm32-unknown-unknown - toolchain: 1.72.0 + toolchain: 1.76.0 override: true - uses: Swatinem/rust-cache@v2 diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index d641b17b284..89983a2c48b 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -19,7 +19,7 @@ jobs: - uses: dtolnay/rust-toolchain@master with: - toolchain: 1.72.0 + toolchain: 1.76.0 - name: Install packages (Linux) if: runner.os == 'Linux' @@ -93,7 +93,7 @@ jobs: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master with: - toolchain: 1.72.0 + toolchain: 1.76.0 targets: wasm32-unknown-unknown - run: sudo apt-get update && sudo apt-get install libgtk-3-dev libatk1.0-dev @@ -151,7 +151,7 @@ jobs: - uses: actions/checkout@v4 - uses: EmbarkStudios/cargo-deny-action@v1 with: - rust-version: "1.72.0" + rust-version: "1.76.0" log-level: error command: check arguments: --target ${{ matrix.target }} @@ -166,7 +166,7 @@ jobs: - uses: dtolnay/rust-toolchain@master with: - toolchain: 1.72.0 + toolchain: 1.76.0 targets: aarch64-linux-android - name: Set up cargo cache @@ -184,7 +184,7 @@ jobs: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master with: - toolchain: 1.72.0 + toolchain: 1.76.0 - name: Set up cargo cache uses: Swatinem/rust-cache@v2 diff --git a/Cargo.toml b/Cargo.toml index 425eb8de208..47ef422cb5a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,7 @@ members = [ [workspace.package] edition = "2021" license = "MIT OR Apache-2.0" -rust-version = "1.72" +rust-version = "1.76" version = "0.27.2" diff --git a/clippy.toml b/clippy.toml index 93d7874068e..d91f9666c47 100644 --- a/clippy.toml +++ b/clippy.toml @@ -3,7 +3,7 @@ # ----------------------------------------------------------------------------- # Section identical to scripts/clippy_wasm/clippy.toml: -msrv = "1.72" +msrv = "1.76" allow-unwrap-in-tests = true diff --git a/crates/eframe/src/native/app_icon.rs b/crates/eframe/src/native/app_icon.rs index 4986549cc1b..39c32dfdb3e 100644 --- a/crates/eframe/src/native/app_icon.rs +++ b/crates/eframe/src/native/app_icon.rs @@ -225,9 +225,7 @@ fn set_title_and_icon_mac(title: &str, icon_data: Option<&IconData>) -> AppIconS } unsafe { - let app = if let Some(app) = NSApp { - app - } else { + let Some(app) = NSApp else { log::debug!("NSApp is null"); return AppIconStatus::NotSetIgnored; }; diff --git a/crates/eframe/src/native/run.rs b/crates/eframe/src/native/run.rs index 896d640de36..3ee249edf76 100644 --- a/crates/eframe/src/native/run.rs +++ b/crates/eframe/src/native/run.rs @@ -391,6 +391,8 @@ pub fn run_glow( mut native_options: epi::NativeOptions, app_creator: epi::AppCreator, ) -> Result<()> { + #![allow(clippy::needless_return_with_question_mark)] // False positive + use super::glow_integration::GlowWinitApp; #[cfg(not(target_os = "ios"))] @@ -414,6 +416,8 @@ pub fn run_wgpu( mut native_options: epi::NativeOptions, app_creator: epi::AppCreator, ) -> Result<()> { + #![allow(clippy::needless_return_with_question_mark)] // False positive + use super::wgpu_integration::WgpuWinitApp; #[cfg(not(target_os = "ios"))] diff --git a/crates/eframe/src/web/storage.rs b/crates/eframe/src/web/storage.rs index 4a2a53326a1..170798dc662 100644 --- a/crates/eframe/src/web/storage.rs +++ b/crates/eframe/src/web/storage.rs @@ -31,7 +31,7 @@ pub(crate) fn load_memory(_: &egui::Context) {} #[cfg(feature = "persistence")] pub(crate) fn save_memory(ctx: &egui::Context) { - match ctx.memory(|mem| ron::to_string(mem)) { + match ctx.memory(ron::to_string) { Ok(ron) => { local_storage_set("egui_memory_ron", &ron); } diff --git a/crates/egui/src/containers/collapsing_header.rs b/crates/egui/src/containers/collapsing_header.rs index 6fb7662af22..7c541a1a2f7 100644 --- a/crates/egui/src/containers/collapsing_header.rs +++ b/crates/egui/src/containers/collapsing_header.rs @@ -230,7 +230,7 @@ impl CollapsingState { } } - /// Paint this [CollapsingState](CollapsingState)'s toggle button. Takes an [IconPainter](IconPainter) as the icon. + /// Paint this [`CollapsingState`]'s toggle button. Takes an [`IconPainter`] as the icon. /// ``` /// # egui::__run_test_ui(|ui| { /// fn circle_icon(ui: &mut egui::Ui, openness: f32, response: &egui::Response) { diff --git a/crates/egui/src/lib.rs b/crates/egui/src/lib.rs index b8f0c8fa3d2..30e3b804f11 100644 --- a/crates/egui/src/lib.rs +++ b/crates/egui/src/lib.rs @@ -517,7 +517,7 @@ macro_rules! include_image { }; } -/// Create a [`Hyperlink`](crate::Hyperlink) to the current [`file!()`] (and line) on Github +/// Create a [`Hyperlink`] to the current [`file!()`] (and line) on Github /// /// ``` /// # egui::__run_test_ui(|ui| { @@ -532,7 +532,7 @@ macro_rules! github_link_file_line { }}; } -/// Create a [`Hyperlink`](crate::Hyperlink) to the current [`file!()`] on github. +/// Create a [`Hyperlink`] to the current [`file!()`] on github. /// /// ``` /// # egui::__run_test_ui(|ui| { diff --git a/crates/egui/src/memory.rs b/crates/egui/src/memory.rs index 7d61acd965f..2ef8bbf58ba 100644 --- a/crates/egui/src/memory.rs +++ b/crates/egui/src/memory.rs @@ -868,7 +868,7 @@ impl Memory { // ---------------------------------------------------------------------------- /// Keeps track of [`Area`](crate::containers::area::Area)s, which are free-floating [`Ui`](crate::Ui)s. -/// These [`Area`](crate::containers::area::Area)s can be in any [`Order`](crate::Order). +/// These [`Area`](crate::containers::area::Area)s can be in any [`Order`]. #[derive(Clone, Debug, Default)] #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] #[cfg_attr(feature = "serde", serde(default))] diff --git a/crates/egui/src/style.rs b/crates/egui/src/style.rs index 9f9aac0534a..aad8e3eea2d 100644 --- a/crates/egui/src/style.rs +++ b/crates/egui/src/style.rs @@ -288,7 +288,7 @@ pub struct Spacing { /// Default rail height of a [`Slider`]. pub slider_rail_height: f32, - /// Default (minimum) width of a [`ComboBox`](crate::ComboBox). + /// Default (minimum) width of a [`ComboBox`]. pub combo_width: f32, /// Default width of a [`TextEdit`]. diff --git a/crates/egui_extras/src/table.rs b/crates/egui_extras/src/table.rs index 5e9cf80fdcd..0cbf5e13b5f 100644 --- a/crates/egui_extras/src/table.rs +++ b/crates/egui_extras/src/table.rs @@ -131,7 +131,7 @@ impl Column { self } - /// Allowed range of movement (in points), if in a resizable [`Table`](crate::table::Table). + /// Allowed range of movement (in points), if in a resizable [`Table`]. #[inline] pub fn range(mut self, range: impl Into) -> Self { self.width_range = range.into(); diff --git a/crates/epaint/src/shape.rs b/crates/epaint/src/shape.rs index 336c9087316..593cc78b0f3 100644 --- a/crates/epaint/src/shape.rs +++ b/crates/epaint/src/shape.rs @@ -1293,12 +1293,7 @@ impl std::fmt::Debug for PaintCallback { impl std::cmp::PartialEq for PaintCallback { fn eq(&self, other: &Self) -> bool { - // As I understand it, the problem this clippy is trying to protect against - // can only happen if we do dynamic casts back and forth on the pointers, and we don't do that. - #[allow(clippy::vtable_address_comparisons)] - { - self.rect.eq(&other.rect) && Arc::ptr_eq(&self.callback, &other.callback) - } + self.rect.eq(&other.rect) && Arc::ptr_eq(&self.callback, &other.callback) } } diff --git a/examples/confirm_exit/Cargo.toml b/examples/confirm_exit/Cargo.toml index 09ad2c4f606..8e9d3af2872 100644 --- a/examples/confirm_exit/Cargo.toml +++ b/examples/confirm_exit/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Emil Ernerfeldt "] license = "MIT OR Apache-2.0" edition = "2021" -rust-version = "1.72" +rust-version = "1.76" publish = false diff --git a/examples/custom_3d_glow/Cargo.toml b/examples/custom_3d_glow/Cargo.toml index d7e70401a47..ef3d1cbc828 100644 --- a/examples/custom_3d_glow/Cargo.toml +++ b/examples/custom_3d_glow/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Emil Ernerfeldt "] license = "MIT OR Apache-2.0" edition = "2021" -rust-version = "1.72" +rust-version = "1.76" publish = false diff --git a/examples/custom_font/Cargo.toml b/examples/custom_font/Cargo.toml index db633431531..89840c4526d 100644 --- a/examples/custom_font/Cargo.toml +++ b/examples/custom_font/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Emil Ernerfeldt "] license = "MIT OR Apache-2.0" edition = "2021" -rust-version = "1.72" +rust-version = "1.76" publish = false diff --git a/examples/custom_font_style/Cargo.toml b/examples/custom_font_style/Cargo.toml index 51990ee919d..60e3e37b9c2 100644 --- a/examples/custom_font_style/Cargo.toml +++ b/examples/custom_font_style/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["tami5 "] license = "MIT OR Apache-2.0" edition = "2021" -rust-version = "1.72" +rust-version = "1.76" publish = false diff --git a/examples/custom_keypad/Cargo.toml b/examples/custom_keypad/Cargo.toml index 1557b35c86c..f008884c5c7 100644 --- a/examples/custom_keypad/Cargo.toml +++ b/examples/custom_keypad/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Varphone Wong "] license = "MIT OR Apache-2.0" edition = "2021" -rust-version = "1.72" +rust-version = "1.76" publish = false diff --git a/examples/custom_plot_manipulation/Cargo.toml b/examples/custom_plot_manipulation/Cargo.toml index 3df5de96f3d..3db38a45b92 100644 --- a/examples/custom_plot_manipulation/Cargo.toml +++ b/examples/custom_plot_manipulation/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Ygor Souza "] license = "MIT OR Apache-2.0" edition = "2021" -rust-version = "1.72" +rust-version = "1.76" publish = false diff --git a/examples/custom_window_frame/Cargo.toml b/examples/custom_window_frame/Cargo.toml index e163bda492a..c334c6a662b 100644 --- a/examples/custom_window_frame/Cargo.toml +++ b/examples/custom_window_frame/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Emil Ernerfeldt "] license = "MIT OR Apache-2.0" edition = "2021" -rust-version = "1.72" +rust-version = "1.76" publish = false diff --git a/examples/file_dialog/Cargo.toml b/examples/file_dialog/Cargo.toml index ceafd1be28a..ef30dfce8e1 100644 --- a/examples/file_dialog/Cargo.toml +++ b/examples/file_dialog/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Emil Ernerfeldt "] license = "MIT OR Apache-2.0" edition = "2021" -rust-version = "1.72" +rust-version = "1.76" publish = false diff --git a/examples/hello_world/Cargo.toml b/examples/hello_world/Cargo.toml index e9e113c6722..acf7e2b8ab8 100644 --- a/examples/hello_world/Cargo.toml +++ b/examples/hello_world/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Emil Ernerfeldt "] license = "MIT OR Apache-2.0" edition = "2021" -rust-version = "1.72" +rust-version = "1.76" publish = false diff --git a/examples/hello_world_par/Cargo.toml b/examples/hello_world_par/Cargo.toml index 442f671e330..3d0e92eaec4 100644 --- a/examples/hello_world_par/Cargo.toml +++ b/examples/hello_world_par/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Maxim Osipenko "] license = "MIT OR Apache-2.0" edition = "2021" -rust-version = "1.72" +rust-version = "1.76" publish = false diff --git a/examples/hello_world_simple/Cargo.toml b/examples/hello_world_simple/Cargo.toml index 5b93eb686c7..bec4670b790 100644 --- a/examples/hello_world_simple/Cargo.toml +++ b/examples/hello_world_simple/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Emil Ernerfeldt "] license = "MIT OR Apache-2.0" edition = "2021" -rust-version = "1.72" +rust-version = "1.76" publish = false diff --git a/examples/images/Cargo.toml b/examples/images/Cargo.toml index b6cb142f723..cd9157f5715 100644 --- a/examples/images/Cargo.toml +++ b/examples/images/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Jan Procházka "] license = "MIT OR Apache-2.0" edition = "2021" -rust-version = "1.72" +rust-version = "1.76" publish = false diff --git a/examples/images/src/ferris.svg b/examples/images/src/ferris.svg index c7f240dd97a..fe1589d912c 100644 --- a/examples/images/src/ferris.svg +++ b/examples/images/src/ferris.svg @@ -3,7 +3,7 @@ - + diff --git a/examples/keyboard_events/Cargo.toml b/examples/keyboard_events/Cargo.toml index 5428bc6a3ae..08f7ba3a81e 100644 --- a/examples/keyboard_events/Cargo.toml +++ b/examples/keyboard_events/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Jose Palazon "] license = "MIT OR Apache-2.0" edition = "2021" -rust-version = "1.72" +rust-version = "1.76" publish = false diff --git a/examples/multiple_viewports/Cargo.toml b/examples/multiple_viewports/Cargo.toml index 37b27cb5f96..b5bd8e80411 100644 --- a/examples/multiple_viewports/Cargo.toml +++ b/examples/multiple_viewports/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Emil Ernerfeldt "] license = "MIT OR Apache-2.0" edition = "2021" -rust-version = "1.72" +rust-version = "1.76" publish = false [features] diff --git a/examples/puffin_profiler/Cargo.toml b/examples/puffin_profiler/Cargo.toml index 021c05651a6..6b6acad726d 100644 --- a/examples/puffin_profiler/Cargo.toml +++ b/examples/puffin_profiler/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Emil Ernerfeldt "] license = "MIT OR Apache-2.0" edition = "2021" -rust-version = "1.72" +rust-version = "1.76" publish = false diff --git a/examples/save_plot/Cargo.toml b/examples/save_plot/Cargo.toml index cb31594343c..7c9eb245285 100644 --- a/examples/save_plot/Cargo.toml +++ b/examples/save_plot/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["hacknus "] license = "MIT OR Apache-2.0" edition = "2021" -rust-version = "1.72" +rust-version = "1.76" publish = false [dependencies] diff --git a/examples/screenshot/Cargo.toml b/examples/screenshot/Cargo.toml index 5c7bbbeec42..0fb5da7fd2a 100644 --- a/examples/screenshot/Cargo.toml +++ b/examples/screenshot/Cargo.toml @@ -7,7 +7,7 @@ authors = [ ] license = "MIT OR Apache-2.0" edition = "2021" -rust-version = "1.72" +rust-version = "1.76" publish = false diff --git a/examples/serial_windows/Cargo.toml b/examples/serial_windows/Cargo.toml index ee0f7b78d25..58d5cdecced 100644 --- a/examples/serial_windows/Cargo.toml +++ b/examples/serial_windows/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Emil Ernerfeldt "] license = "MIT OR Apache-2.0" edition = "2021" -rust-version = "1.72" +rust-version = "1.76" publish = false diff --git a/examples/test_inline_glow_paint/Cargo.toml b/examples/test_inline_glow_paint/Cargo.toml index f1ff645ac27..893b0d07de1 100644 --- a/examples/test_inline_glow_paint/Cargo.toml +++ b/examples/test_inline_glow_paint/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Emil Ernerfeldt "] license = "MIT OR Apache-2.0" edition = "2021" -rust-version = "1.72" +rust-version = "1.76" publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/examples/test_viewports/Cargo.toml b/examples/test_viewports/Cargo.toml index cd5b2be0e18..4e106e37ec8 100644 --- a/examples/test_viewports/Cargo.toml +++ b/examples/test_viewports/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["konkitoman"] license = "MIT OR Apache-2.0" edition = "2021" -rust-version = "1.72" +rust-version = "1.76" publish = false [features] diff --git a/examples/user_attention/Cargo.toml b/examples/user_attention/Cargo.toml index 02a776477dd..10f0ce711c0 100644 --- a/examples/user_attention/Cargo.toml +++ b/examples/user_attention/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["TicClick "] license = "MIT OR Apache-2.0" edition = "2021" -rust-version = "1.72" +rust-version = "1.76" publish = false [dependencies] diff --git a/rust-toolchain b/rust-toolchain index 694e5af99e5..871f562485d 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -5,6 +5,6 @@ # to the user in the error, instead of "error: invalid channel name '[toolchain]'". [toolchain] -channel = "1.72.0" +channel = "1.76.0" components = ["rustfmt", "clippy"] targets = ["wasm32-unknown-unknown"] diff --git a/scripts/clippy_wasm/clippy.toml b/scripts/clippy_wasm/clippy.toml index 0e8b9474ea7..943444cfc50 100644 --- a/scripts/clippy_wasm/clippy.toml +++ b/scripts/clippy_wasm/clippy.toml @@ -6,7 +6,7 @@ # ----------------------------------------------------------------------------- # Section identical to the root clippy.toml: -msrv = "1.72" +msrv = "1.76" allow-unwrap-in-tests = true