From 2bf0397d806ef108dbe148a09a3abae108b7fe03 Mon Sep 17 00:00:00 2001 From: Darren Schroeder <343840+fdncred@users.noreply.github.com> Date: Thu, 3 Apr 2025 14:08:59 -0500 Subject: [PATCH] bump to the latest rust version (#15483) # Description This PR bumps nushell to use the latest rust version 1.84.1. --- Cargo.toml | 2 +- crates/nu-path/src/trailing_slash.rs | 2 +- .../nu_plugin_polars/src/dataframe/values/nu_dataframe/mod.rs | 2 +- crates/nu_plugin_query/src/web_tables.rs | 2 +- rust-toolchain.toml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 11762c72a6..9482c837cf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ homepage = "https://www.nushell.sh" license = "MIT" name = "nu" repository = "https://github.com/nushell/nushell" -rust-version = "1.83.0" +rust-version = "1.84.1" version = "0.103.1" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/nu-path/src/trailing_slash.rs b/crates/nu-path/src/trailing_slash.rs index 6a2d08ac63..dd7909dee0 100644 --- a/crates/nu-path/src/trailing_slash.rs +++ b/crates/nu-path/src/trailing_slash.rs @@ -40,7 +40,7 @@ pub fn has_trailing_slash(path: &Path) -> bool { #[cfg(target_arch = "wasm32")] pub fn has_trailing_slash(path: &Path) -> bool { // in the web paths are often just URLs, they are separated by forward slashes - path.to_str().map_or(false, |s| s.ends_with('/')) + path.to_str().is_some_and(|s| s.ends_with('/')) } #[cfg(test)] diff --git a/crates/nu_plugin_polars/src/dataframe/values/nu_dataframe/mod.rs b/crates/nu_plugin_polars/src/dataframe/values/nu_dataframe/mod.rs index de21abafdd..55c1f620c9 100644 --- a/crates/nu_plugin_polars/src/dataframe/values/nu_dataframe/mod.rs +++ b/crates/nu_plugin_polars/src/dataframe/values/nu_dataframe/mod.rs @@ -71,7 +71,7 @@ impl Default for DataFrameValue { impl PartialEq for DataFrameValue { fn eq(&self, other: &Self) -> bool { - self.0.partial_cmp(&other.0).map_or(false, Ordering::is_eq) + self.0.partial_cmp(&other.0).is_some_and(Ordering::is_eq) } } impl Eq for DataFrameValue {} diff --git a/crates/nu_plugin_query/src/web_tables.rs b/crates/nu_plugin_query/src/web_tables.rs index fef8f6c37e..1383c3deaf 100644 --- a/crates/nu_plugin_query/src/web_tables.rs +++ b/crates/nu_plugin_query/src/web_tables.rs @@ -66,7 +66,7 @@ impl WebTable { let mut tables = html .select(&sel_table) .filter(|table| { - table.select(&sel_tr).next().map_or(false, |tr| { + table.select(&sel_tr).next().is_some_and(|tr| { let cells = select_cells(tr, &sel_th, true); if inspect_mode { eprintln!("Potential HTML Headers = {:?}\n", &cells); diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 2f6272a99b..62c90079fd 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -16,4 +16,4 @@ profile = "default" # use in nushell, we may opt to use the bleeding edge stable version of rust. # I believe rust is on a 6 week release cycle and nushell is on a 4 week release cycle. # So, every two nushell releases, this version number should be bumped by one. -channel = "1.83.0" +channel = "1.84.1"