mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 17:45:03 +02:00
Make which-support
feature non-optional (#13125)
# Description Removes the `which-support` cargo feature and makes all of its feature-gated code enabled by default in all builds. I'm not sure why this one command is gated behind a feature. It seems to be a relic of older code where we had features for what seems like every command.
This commit is contained in:
@ -92,7 +92,6 @@ fn get_entries_in_nu(
|
||||
all_entries
|
||||
}
|
||||
|
||||
#[cfg(feature = "which-support")]
|
||||
fn get_first_entry_in_path(
|
||||
item: &str,
|
||||
span: Span,
|
||||
@ -104,17 +103,6 @@ fn get_first_entry_in_path(
|
||||
.ok()
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "which-support"))]
|
||||
fn get_first_entry_in_path(
|
||||
_item: &str,
|
||||
_span: Span,
|
||||
_cwd: impl AsRef<Path>,
|
||||
_paths: impl AsRef<OsStr>,
|
||||
) -> Option<Value> {
|
||||
None
|
||||
}
|
||||
|
||||
#[cfg(feature = "which-support")]
|
||||
fn get_all_entries_in_path(
|
||||
item: &str,
|
||||
span: Span,
|
||||
@ -129,16 +117,6 @@ fn get_all_entries_in_path(
|
||||
.unwrap_or_default()
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "which-support"))]
|
||||
fn get_all_entries_in_path(
|
||||
_item: &str,
|
||||
_span: Span,
|
||||
_cwd: impl AsRef<Path>,
|
||||
_paths: impl AsRef<OsStr>,
|
||||
) -> Vec<Value> {
|
||||
vec![]
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
struct WhichArgs {
|
||||
applications: Vec<Spanned<String>>,
|
||||
|
Reference in New Issue
Block a user