From d3ef4bd7dadfed050afd345b1946197c040e4950 Mon Sep 17 00:00:00 2001 From: Roy Ivy III Date: Fri, 24 Jul 2020 21:57:53 -0500 Subject: [PATCH 1/4] maint/CICD ~ update 'actions/upload-artifact' to 'v2' --- .github/workflows/CICD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index 3e5ec3b84..281af521c 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -322,7 +322,7 @@ jobs: command: test args: --target=${{ matrix.job.target }} ${{ steps.vars.outputs.CARGO_TEST_OPTIONS}} ${{ matrix.job.cargo-options }} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} - name: Archive executable artifacts - uses: actions/upload-artifact@master + uses: actions/upload-artifact@v2 with: name: ${{ env.PROJECT_NAME }}-${{ matrix.job.target }} path: target/${{ matrix.job.target }}/release/${{ env.PROJECT_NAME }}${{ steps.vars.outputs.EXE_suffix }} From 326ff36793bb9853d9de28c5e5c52dd7ae154983 Mon Sep 17 00:00:00 2001 From: Roy Ivy III Date: Fri, 24 Jul 2020 22:21:20 -0500 Subject: [PATCH 2/4] refactor/polosh ~ fix `cargo clippy` complaint (reversed_empty_ranges) --- src/uu/split/src/split.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uu/split/src/split.rs b/src/uu/split/src/split.rs index 904ed9095..bba5cea39 100644 --- a/src/uu/split/src/split.rs +++ b/src/uu/split/src/split.rs @@ -230,7 +230,7 @@ impl Splitter for ByteSplitter { self.bytes_to_write = self.saved_bytes_to_write; control.request_new_file = true; self.require_whole_line = false; - return line[0..0].to_owned(); + return "".to_owned(); } self.bytes_to_write -= n; if n == 0 { From 305c3cbcdba1bcdef9055384cb66001c56e02b06 Mon Sep 17 00:00:00 2001 From: Roy Ivy III Date: Fri, 24 Jul 2020 22:21:54 -0500 Subject: [PATCH 3/4] refactor/polish ~ fix `cargo clippy` complaint (bind_instead_of_map) --- src/uu/tee/src/tee.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/uu/tee/src/tee.rs b/src/uu/tee/src/tee.rs index a75287d97..f715f9e7c 100644 --- a/src/uu/tee/src/tee.rs +++ b/src/uu/tee/src/tee.rs @@ -44,7 +44,7 @@ fn options(args: &[String]) -> Result { opts.parse(&args[1..]) .map_err(|e| Error::new(ErrorKind::Other, format!("{}", e))) - .and_then(|m| { + .map(|m| { let version = format!("{} {}", NAME, VERSION); let arguments = "[OPTION]... [FILE]..."; let brief = "Copy standard input to each FILE, and also to standard output."; @@ -65,13 +65,13 @@ fn options(args: &[String]) -> Result { } else { None }; - Ok(Options { + Options { program: NAME.to_owned(), append: m.opt_present("append"), ignore_interrupts: m.opt_present("ignore-interrupts"), print_and_exit: to_print, files: names, - }) + } }) .map_err(|message| warn(format!("{}", message).as_ref())) } From c36d71ba435de39f84cd539d7963f44a8430c584 Mon Sep 17 00:00:00 2001 From: Roy Ivy III Date: Fri, 24 Jul 2020 22:23:00 -0500 Subject: [PATCH 4/4] refactor/polish ~ fix `cargo clippy` complaint (needless_lifetimes) --- src/uu/cp/src/cp.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uu/cp/src/cp.rs b/src/uu/cp/src/cp.rs index 090709c00..3c04a55e5 100644 --- a/src/uu/cp/src/cp.rs +++ b/src/uu/cp/src/cp.rs @@ -873,7 +873,7 @@ fn copy_source( } #[cfg(target_os = "windows")] -fn adjust_canonicalization<'a>(p: &'a Path) -> Cow<'a, Path> { +fn adjust_canonicalization(p: &Path) -> Cow { // In some cases, \\? can be missing on some Windows paths. Add it at the // beginning unless the path is prefixed with a device namespace. const VERBATIM_PREFIX: &str = r#"\\?"#;