From f6cb5c325da5af1fd1f85962ecf6ac5640a5611c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= Date: Mon, 21 Oct 2024 11:29:28 +0200 Subject: [PATCH 1/2] Bump minimum Rust version to `1.81.0` --- .github/workflows/build.yml | 4 ++-- .github/workflows/test.yml | 2 +- Cargo.toml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ea699667d..64943742e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -52,7 +52,7 @@ jobs: uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: 1.80.0 + toolchain: 1.81.0 override: true - uses: Swatinem/rust-cache@v2.7.0 @@ -103,7 +103,7 @@ jobs: uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: 1.80.0 + toolchain: 1.81.0 override: true - uses: Swatinem/rust-cache@v2.7.0 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0607f7e7c..0d4d72ffe 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,7 +19,7 @@ jobs: uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: 1.80.0 + toolchain: 1.81.0 override: true components: clippy, rustfmt diff --git a/Cargo.toml b/Cargo.toml index 3accd8837..c55ba0d2b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ default-members = [ resolver = "2" [workspace.package] -rust-version = "1.80.0" +rust-version = "1.81.0" edition = "2021" authors = ["Ada Böhm ", "Jakub Beránek "] From fd7a7c99616c655eb33f160f6084bf409ed29557 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= Date: Mon, 21 Oct 2024 11:29:54 +0200 Subject: [PATCH 2/2] Fix deprecation warnings --- crates/hyperqueue/src/bin/hq.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/crates/hyperqueue/src/bin/hq.rs b/crates/hyperqueue/src/bin/hq.rs index e314a2a0d..8e47514e8 100644 --- a/crates/hyperqueue/src/bin/hq.rs +++ b/crates/hyperqueue/src/bin/hq.rs @@ -1,11 +1,10 @@ -use std::io; -use std::io::IsTerminal; -use std::panic::PanicInfo; - use clap::{CommandFactory, FromArgMatches}; use clap_complete::generate; use cli_table::ColorChoice; use colored::Colorize; +use std::io; +use std::io::IsTerminal; +use std::panic::PanicHookInfo; use hyperqueue::client::commands::autoalloc::command_autoalloc; use hyperqueue::client::commands::job::{ @@ -351,7 +350,7 @@ fn generate_completion(opts: GenerateCompletionOpts) -> anyhow::Result<()> { Ok(()) } -fn hq_panic_hook(_info: &PanicInfo) { +fn hq_panic_hook(_info: &PanicHookInfo) { let message = format!( r#"Oops, HyperQueue has crashed. This is a bug, sorry for that. If you would be so kind, please report this issue at the HQ issue tracker: https://github.com/It4innovations/hyperqueue/issues/new?title=HQ%20crashes @@ -377,7 +376,7 @@ async fn main() -> hyperqueue::Result<()> { // Augment panics - first print the error and backtrace like normally, // and then print our own custom error message. let std_panic = std::panic::take_hook(); - std::panic::set_hook(Box::new(move |info: &PanicInfo| { + std::panic::set_hook(Box::new(move |info: &PanicHookInfo| { std_panic(info); hq_panic_hook(info); }));