mirror of
https://github.com/nushell/nushell.git
synced 2025-02-15 01:52:07 +01:00
# Description Following #11851, 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`. |
||
---|---|---|
.. | ||
create.rs | ||
delete.rs | ||
export.rs | ||
import.rs | ||
insert.rs | ||
mod.rs | ||
open.rs | ||
reset.rs | ||
stor_.rs | ||
update.rs |