Implement IntoValue for more types (#13744)

# Description

Implements `IntoValue` for `&str` and `DateTime` as well as other
nushell types like `Record` and `Closure`. Also allows `HashMap`s with
keys besides `String` to implement `IntoValue`.
This commit is contained in:
Ian Manske
2024-09-01 10:02:12 -07:00
committed by GitHub
parent f4940e115f
commit e3f59910b8
3 changed files with 65 additions and 18 deletions

View File

@ -191,7 +191,7 @@ fn enum_into_value(
.as_str()
.to_case(container_attrs.rename_all.unwrap_or(Case::Snake));
match &variant.fields {
// In the future we can implement more complexe enums here.
// In the future we can implement more complex enums here.
Fields::Named(fields) => Err(DeriveError::UnsupportedEnums {
fields_span: fields.span(),
}),