1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-08-01 21:47:46 +00:00

Merge pull request #1565 from rivy/fix.warnings

Fix CICD warnings
This commit is contained in:
Sylvestre Ledru 2020-07-29 17:55:40 +02:00 committed by GitHub
commit d57cba1f2a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View file

@ -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 }}

View file

@ -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<Path> {
// 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#"\\?"#;

View file

@ -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 {

View file

@ -44,7 +44,7 @@ fn options(args: &[String]) -> Result<Options> {
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<Options> {
} 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()))
}