mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 07:16:05 +02:00
Update deprecation warnings (#15867)
# Description - Use #15770 to - improve `get --sensitive` deprecation warning - add deprecation warning for `filter` - refactor `filter` to use `where` as its implementation - replace usages of `filter` with `where` in `std` # User-Facing Changes - `get --sensitive` will raise a warning only once, during parsing whereas before it was raised during runtime for each usage. - using `filter` will raise a deprecation warning, once # Tests + Formatting No existing test broke or required tweaking. Additional tests covering this case was added. - 🟢 toolkit fmt - 🟢 toolkit clippy - 🟢 toolkit test - 🟢 toolkit test stdlib # After Submitting N/A --------- Co-authored-by: Bahex <17417311+Bahex@users.noreply.github.com>
This commit is contained in:
@ -62,7 +62,7 @@ def xupdate-string-step [ step: string rest: list updater: closure ] {
|
||||
let input = $in
|
||||
|
||||
# Get a list of elements to be updated and their indices
|
||||
let to_update = ($input.content | enumerate | filter {|it|
|
||||
let to_update = ($input.content | enumerate | where {|it|
|
||||
let item = $it.item
|
||||
$step == '*' or $item.tag == $step
|
||||
})
|
||||
|
Reference in New Issue
Block a user