From e93e51d672e7e3a3aec3bf2775842069bfe5d9f6 Mon Sep 17 00:00:00 2001 From: Darren Schroeder <343840+fdncred@users.noreply.github.com> Date: Thu, 16 Nov 2023 15:14:45 -0600 Subject: [PATCH] bump rust-toolchain to 1.72.1 (#11079) # Description This PR follows our process of staying 2 releases behind rust. 1.74.0 was released today so we update to 1.72.1. Reference https://releases.rs/ # User-Facing Changes # Tests + Formatting # After Submitting --- crates/nu-command/src/filters/find.rs | 5 +++-- crates/nu-command/tests/commands/cd.rs | 4 ++-- crates/nu-command/tests/commands/path/parse.rs | 4 ++-- crates/nu-command/tests/format_conversions/csv.rs | 1 + crates/nu-command/tests/format_conversions/tsv.rs | 1 + crates/nu-system/src/windows.rs | 4 ++-- rust-toolchain.toml | 2 +- src/tests/test_config_path.rs | 2 +- 8 files changed, 13 insertions(+), 10 deletions(-) diff --git a/crates/nu-command/src/filters/find.rs b/crates/nu-command/src/filters/find.rs index 4f26477e0e..30c728e743 100644 --- a/crates/nu-command/src/filters/find.rs +++ b/crates/nu-command/src/filters/find.rs @@ -304,8 +304,9 @@ fn highlight_terms_in_record_with_search_columns( let val_str = val.into_string("", config); let Some(term_str) = term_strs .iter() - .find(|term_str| contains_ignore_case(&val_str, term_str)) else { - continue; + .find(|term_str| contains_ignore_case(&val_str, term_str)) + else { + continue; }; let highlighted_str = diff --git a/crates/nu-command/tests/commands/cd.rs b/crates/nu-command/tests/commands/cd.rs index 8d9e086ffa..41e955d626 100644 --- a/crates/nu-command/tests/commands/cd.rs +++ b/crates/nu-command/tests/commands/cd.rs @@ -269,10 +269,10 @@ fn cd_permission_denied_folder() { sandbox.mkdir("banned"); let actual = nu!( cwd: dirs.test(), - r#" + r" icacls banned /deny BUILTIN\Administrators:F cd banned - "# + " ); assert!(actual.err.contains("Folder is not able to read")); }); diff --git a/crates/nu-command/tests/commands/path/parse.rs b/crates/nu-command/tests/commands/path/parse.rs index 4783a5885b..73668284d7 100644 --- a/crates/nu-command/tests/commands/path/parse.rs +++ b/crates/nu-command/tests/commands/path/parse.rs @@ -5,11 +5,11 @@ use nu_test_support::{nu, pipeline}; fn parses_single_path_prefix() { let actual = nu!( cwd: "tests", pipeline( - r#" + r" echo 'C:\users\viking\spam.txt' | path parse | get prefix - "# + " )); assert_eq!(actual.out, "C:"); diff --git a/crates/nu-command/tests/format_conversions/csv.rs b/crates/nu-command/tests/format_conversions/csv.rs index a10ebeb14c..f58ff6598e 100644 --- a/crates/nu-command/tests/format_conversions/csv.rs +++ b/crates/nu-command/tests/format_conversions/csv.rs @@ -183,6 +183,7 @@ fn from_csv_text_with_tab_separator_to_table() { } #[test] +#[allow(clippy::needless_raw_string_hashes)] fn from_csv_text_with_comments_to_table() { Playground::setup("filter_from_csv_test_5", |dirs, sandbox| { sandbox.with_files(vec![FileWithContentToBeTrimmed( diff --git a/crates/nu-command/tests/format_conversions/tsv.rs b/crates/nu-command/tests/format_conversions/tsv.rs index ca71c25e7a..12e246de97 100644 --- a/crates/nu-command/tests/format_conversions/tsv.rs +++ b/crates/nu-command/tests/format_conversions/tsv.rs @@ -106,6 +106,7 @@ fn from_tsv_text_to_table() { } #[test] +#[allow(clippy::needless_raw_string_hashes)] fn from_tsv_text_with_comments_to_table() { Playground::setup("filter_from_tsv_test_2", |dirs, sandbox| { sandbox.with_files(vec![FileWithContentToBeTrimmed( diff --git a/crates/nu-system/src/windows.rs b/crates/nu-system/src/windows.rs index 8598c8262e..d3ec7fca15 100644 --- a/crates/nu-system/src/windows.rs +++ b/crates/nu-system/src/windows.rs @@ -969,9 +969,9 @@ fn get_name(psid: PSID) -> Option<(String, String)> { let ret = LookupAccountSidW( ptr::null::() as *mut u16, psid, - name.as_mut_ptr() as *mut u16, + name.as_mut_ptr(), &mut cc_name, - domainname.as_mut_ptr() as *mut u16, + domainname.as_mut_ptr(), &mut cc_domainname, &mut pe_use, ); diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 97578b5127..275eaed48a 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.71.1" +channel = "1.72.1" diff --git a/src/tests/test_config_path.rs b/src/tests/test_config_path.rs index dd15396b35..ec17d27d8c 100644 --- a/src/tests/test_config_path.rs +++ b/src/tests/test_config_path.rs @@ -10,7 +10,7 @@ fn adjust_canonicalization>(p: P) -> String { #[cfg(target_os = "windows")] fn adjust_canonicalization>(p: P) -> String { - const VERBATIM_PREFIX: &str = r#"\\?\"#; + const VERBATIM_PREFIX: &str = r"\\?\"; let p = p.as_ref().display().to_string(); if let Some(stripped) = p.strip_prefix(VERBATIM_PREFIX) { stripped.to_string()