Fix trash-support feature flag (#4394)

Pass it through to be inclued with `--all-features`

Make clippy without `--all-features` happy
This commit is contained in:
Stefan Holderbach 2022-02-10 00:20:46 +01:00 committed by GitHub
parent 12d4c2986c
commit e1f98c1bfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -77,6 +77,7 @@ default = ["plugin", "inc", "example", "which"]
stable = ["default"]
extra = [ "default", "dataframe", "gstat", "zip-support", "query", ]
wasi = ["inc"]
trash-support = ["nu-command/trash-support"]
# Stable (Default)
inc = ["nu_plugin_inc"]

View File

@ -1,4 +1,5 @@
use std::collections::HashMap;
#[cfg(feature = "trash-support")]
use std::io::ErrorKind;
#[cfg(unix)]
use std::os::unix::prelude::FileTypeExt;
@ -73,6 +74,7 @@ fn rm(
call: &Call,
) -> Result<PipelineData, ShellError> {
let trash = call.has_flag("trash");
#[cfg(feature = "trash-support")]
let permanent = call.has_flag("permanent");
let recursive = call.has_flag("recursive");
let force = call.has_flag("force");