From c1972c846248db174d4c2380f374010a9e5ae987 Mon Sep 17 00:00:00 2001 From: Martin Ling Date: Wed, 3 Jul 2024 16:27:59 +0100 Subject: [PATCH 1/2] Clippy fix. --- src/ui.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ui.rs b/src/ui.rs index 2c492e96..ef068793 100644 --- a/src/ui.rs +++ b/src/ui.rs @@ -93,8 +93,10 @@ static UPDATE_INTERVAL: Duration = Duration::from_millis(10); static UPDATE_LOCK: Mutex<()> = Mutex::new(()); thread_local!( - static WINDOW: RefCell> = RefCell::new(None); - static UI: RefCell> = RefCell::new(None); + static WINDOW: RefCell> = + const { RefCell::new(None) }; + static UI: RefCell> = + const { RefCell::new(None) }; ); #[derive(Copy, Clone, PartialEq)] From 2d24dcdb2fd4ed374c35b37dd23e9e12ae6f2466 Mon Sep 17 00:00:00 2001 From: Martin Ling Date: Wed, 3 Jul 2024 13:59:15 +0100 Subject: [PATCH 2/2] Bump MSRV to 1.74, and actually test it this time. --- .github/workflows/rust.yml | 3 ++- Cargo.toml | 2 +- README.md | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 6804193b..dd31ba3f 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -44,7 +44,7 @@ jobs: fail-fast: false matrix: os: ['macos-latest', 'ubuntu-22.04', 'windows-latest'] - rust: ['stable', '1.57'] + rust: ['stable', '1.74'] runs-on: ${{ matrix.os }} @@ -56,6 +56,7 @@ jobs: - uses: actions-rs/toolchain@v1 with: toolchain: ${{ matrix.rust }} + override: true - uses: awalsh128/cache-apt-pkgs-action@latest with: diff --git a/Cargo.toml b/Cargo.toml index 99773aee..bb3b98b2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ homepage = "https://github.com/greatscottgadgets/packetry" repository = "https://github.com/greatscottgadgets/packetry" documentation = "https://packetry.readthedocs.io" edition = "2021" -rust-version = "1.57" +rust-version = "1.74" include = [ "CHANGELOG.md", diff --git a/README.md b/README.md index bcc859d4..246f93fa 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Packetry is currently in active development and not yet ready for initial releas Packetry is written in [Rust](https://rust-lang.org/), with its GUI using [GTK 4](https://gtk.org) via the [gtk-rs](https://gtk-rs.org/) bindings. -To build it, you need a working Rust development environment. The minimum supported Rust version is 1.57. +To build it, you need a working Rust development environment. The minimum supported Rust version is 1.74. You must also have the GTK 4 headers installed and discoverable via `pkg-config`, as this is required for Rust to build the gtk-rs crates. @@ -28,7 +28,7 @@ Note: Do not build with `--all-features`. All the optional features currently in Install the Rust build tools, other essential build tools, and GTK 4 headers. -On Debian based systems it should be sufficient to use the command: +On Debian based systems it may be sufficient to use the command: `apt install rustc cargo build-essential libgtk-4-dev` @@ -38,7 +38,7 @@ For Fedora systems: For other distributions, a similar set of packages should be required. -You can also omit Rust and Cargo and use [rustup](https://rustup.rs/) to get the latest Rust toolchain and manage your Rust installation. +Note that Packetry requires a minimum Rust version of 1.74. If your distribution's packages are older than this, use [rustup](https://rustup.rs/) to get the latest Rust toolchain and manage your Rust installation. #### macOS