Add global mode to str trim (#2576)

* Add global mode to str trim

The global mode allows skipping non-string values,
and processes rows and tables as well

* Add tests to action with ActionMode::Global
This commit is contained in:
Radek Vít
2020-09-20 11:04:26 +02:00
committed by GitHub
parent 1882a32b83
commit a5b6bb6209
5 changed files with 215 additions and 24 deletions

View File

@ -206,9 +206,9 @@ pub mod value {
#[macro_export]
macro_rules! row {
($( $key: expr => $val: expr ),*) => {{
let mut map = indexmap::IndexMap::new();
let mut map = ::indexmap::IndexMap::new();
$( map.insert($key, $val); )*
UntaggedValue::row(map).into_untagged_value()
::nu_protocol::UntaggedValue::row(map).into_untagged_value()
}}
}
}