diff --git a/.github/workflows/deploy_web_demo.yml b/.github/workflows/deploy_web_demo.yml
index 717266d6362e..7be0b42f358d 100644
--- a/.github/workflows/deploy_web_demo.yml
+++ b/.github/workflows/deploy_web_demo.yml
@@ -39,7 +39,7 @@ jobs:
with:
profile: minimal
target: wasm32-unknown-unknown
- toolchain: 1.76.0
+ toolchain: 1.77.0
override: true
- uses: Swatinem/rust-cache@v2
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index 077580dcafb2..7f429533d4d7 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -18,7 +18,7 @@ jobs:
- uses: dtolnay/rust-toolchain@master
with:
- toolchain: 1.76.0
+ toolchain: 1.77.0
- name: Install packages (Linux)
if: runner.os == 'Linux'
@@ -83,7 +83,7 @@ jobs:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
- toolchain: 1.76.0
+ toolchain: 1.77.0
targets: wasm32-unknown-unknown
- run: sudo apt-get update && sudo apt-get install libgtk-3-dev libatk1.0-dev
@@ -155,7 +155,7 @@ jobs:
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v1
with:
- rust-version: "1.76.0"
+ rust-version: "1.77.0"
log-level: error
command: check
arguments: --target ${{ matrix.target }}
@@ -170,7 +170,7 @@ jobs:
- uses: dtolnay/rust-toolchain@master
with:
- toolchain: 1.76.0
+ toolchain: 1.77.0
targets: aarch64-linux-android
- name: Set up cargo cache
@@ -189,7 +189,7 @@ jobs:
- uses: dtolnay/rust-toolchain@master
with:
- toolchain: 1.76.0
+ toolchain: 1.77.0
targets: aarch64-apple-ios
- name: Set up cargo cache
@@ -208,7 +208,7 @@ jobs:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
- toolchain: 1.76.0
+ toolchain: 1.77.0
- name: Set up cargo cache
uses: Swatinem/rust-cache@v2
@@ -232,7 +232,7 @@ jobs:
lfs: true
- uses: dtolnay/rust-toolchain@master
with:
- toolchain: 1.76.0
+ toolchain: 1.77.0
- name: Set up cargo cache
uses: Swatinem/rust-cache@v2
diff --git a/Cargo.toml b/Cargo.toml
index c50a51d76e04..47d10f9aad31 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -23,7 +23,7 @@ members = [
[workspace.package]
edition = "2021"
license = "MIT OR Apache-2.0"
-rust-version = "1.76"
+rust-version = "1.77"
version = "0.29.1"
diff --git a/clippy.toml b/clippy.toml
index 5076633912b1..05e436ac419b 100644
--- a/clippy.toml
+++ b/clippy.toml
@@ -3,7 +3,7 @@
# -----------------------------------------------------------------------------
# Section identical to scripts/clippy_wasm/clippy.toml:
-msrv = "1.76"
+msrv = "1.77"
allow-unwrap-in-tests = true
diff --git a/crates/ecolor/src/hex_color_macro.rs b/crates/ecolor/src/hex_color_macro.rs
index fd1075dc6392..e95bbc465f56 100644
--- a/crates/ecolor/src/hex_color_macro.rs
+++ b/crates/ecolor/src/hex_color_macro.rs
@@ -40,11 +40,10 @@
macro_rules! hex_color {
($s:literal) => {{
let array = $crate::color_hex::color_from_hex!($s);
- if array.len() == 3 {
- $crate::Color32::from_rgb(array[0], array[1], array[2])
- } else {
- #[allow(unconditional_panic)]
- $crate::Color32::from_rgba_unmultiplied(array[0], array[1], array[2], array[3])
+ match array.as_slice() {
+ [r, g, b] => $crate::Color32::from_rgb(*r, *g, *b),
+ [r, g, b, a] => $crate::Color32::from_rgba_unmultiplied(*r, *g, *b, *a),
+ _ => panic!("Invalid hex color length: expected 3 (RGB) or 4 (RGBA) bytes"),
}
}};
}
diff --git a/crates/eframe/src/native/event_loop_context.rs b/crates/eframe/src/native/event_loop_context.rs
index 2bb9e42555a4..8f54681a869c 100644
--- a/crates/eframe/src/native/event_loop_context.rs
+++ b/crates/eframe/src/native/event_loop_context.rs
@@ -2,7 +2,7 @@ use std::cell::Cell;
use winit::event_loop::ActiveEventLoop;
thread_local! {
- static CURRENT_EVENT_LOOP: Cell