1
0
mirror of https://github.com/nushell/nushell.git synced 2025-04-26 14:18:19 +02:00
nushell/crates/nu-command
Ian Manske 68fcd71898
Add Value::coerce_str ()
# Description
Following , this PR adds one final conversion function for
`Value`. `Value::coerce_str` takes a `&Value` and converts it to a
`Cow<str>`, creating an owned `String` for types that needed converting.
Otherwise, it returns a borrowed `str` for `String` and `Binary`
`Value`s which avoids a clone/allocation. Where possible, `coerce_str`
and `coerce_into_string` should be used instead of `coerce_string`,
since `coerce_string` always allocates a new `String`.
2024-02-18 17:47:10 +01:00
..
src Add Value::coerce_str () 2024-02-18 17:47:10 +01:00
tests Remove Record::from_raw_cols_vals_unchecked () 2024-02-18 14:20:22 +02:00
Cargo.toml update to the latest reedline and rusqlite () 2024-02-17 09:32:17 -06:00
LICENSE Fix rest of license year ranges () 2023-04-04 09:03:29 +12:00