From 6e8d57c9ec13b5df6c3f5a6e8f537249c0fa4b46 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 12 Mar 2026 15:04:30 -0500 Subject: [PATCH 1/2] chore: Bump MSRV to 1.85 --- Cargo.toml | 2 +- crates/completest-nu/src/lib.rs | 16 +++++----------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 279276d..78c81c3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ members = [ "crates/*"] repository = "https://github.com/assert-rs/completest" license = "MIT OR Apache-2.0" edition = "2021" -rust-version = "1.70.0" # MSRV +rust-version = "1.85.0" # MSRV include = [ "build.rs", "src/**/*", diff --git a/crates/completest-nu/src/lib.rs b/crates/completest-nu/src/lib.rs index bef017c..e7afeae 100644 --- a/crates/completest-nu/src/lib.rs +++ b/crates/completest-nu/src/lib.rs @@ -181,10 +181,7 @@ fn external_completion( let mut working_set = StateWorkingSet::new(&engine_state); let block = parse(&mut working_set, None, completer.as_bytes(), false); if !working_set.parse_errors.is_empty() { - return Err(std::io::Error::new( - std::io::ErrorKind::Other, - working_set.parse_errors.remove(0), - )); + return Err(std::io::Error::other(working_set.parse_errors.remove(0))); } (block, working_set.render()) @@ -192,19 +189,16 @@ fn external_completion( engine_state .merge_delta(delta) - .map_err(|err| std::io::Error::new(std::io::ErrorKind::Other, err))?; + .map_err(std::io::Error::other)?; } // Merge environment into the permanent state engine_state .merge_env(&mut stack, home) - .map_err(|err| std::io::Error::new(std::io::ErrorKind::Other, err))?; + .map_err(std::io::Error::other)?; if engine_state.num_blocks() == 0 { - return Err(std::io::Error::new( - std::io::ErrorKind::Other, - "completer not registered", - )); + return Err(std::io::Error::other("completer not registered")); } let latest_block_id = engine_state.num_blocks() - 1; @@ -265,7 +259,7 @@ fn new_engine(path: &OsStr, home: &Path) -> std::io::Result<(EngineState, Stack) // Merge environment into the permanent state engine_state .merge_env(&mut stack, home) - .map_err(|err| std::io::Error::new(std::io::ErrorKind::Other, err))?; + .map_err(std::io::Error::other)?; Ok((engine_state, stack)) } From 42076224e4b8bf135076a985d283fcb6e8f0a3aa Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 12 Mar 2026 15:05:17 -0500 Subject: [PATCH 2/2] chore: Update to 2024 edition --- Cargo.toml | 4 ++-- crates/completest-nu/src/lib.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 78c81c3..48c6603 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,11 +1,11 @@ [workspace] -resolver = "2" +resolver = "3" members = [ "crates/*"] [workspace.package] repository = "https://github.com/assert-rs/completest" license = "MIT OR Apache-2.0" -edition = "2021" +edition = "2024" rust-version = "1.85.0" # MSRV include = [ "build.rs", diff --git a/crates/completest-nu/src/lib.rs b/crates/completest-nu/src/lib.rs index e7afeae..a2fd806 100644 --- a/crates/completest-nu/src/lib.rs +++ b/crates/completest-nu/src/lib.rs @@ -31,8 +31,8 @@ use nu_cli::NuCompleter; use nu_command::add_shell_command_context; use nu_parser::parse; use nu_protocol::{ - engine::{EngineState, Stack, StateWorkingSet}, Value, + engine::{EngineState, Stack, StateWorkingSet}, }; use reedline::Completer;