-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
enhancementAny new improvement worthy of a entry in the changelogAny new improvement worthy of a entry in the changelog
Description
I am maintaining the serde_arrow crate. Initially I used &[Field] in my signatures, but more recently switched to the more idiomatic &[FieldRef]. I could cover both signatures with a generic F: AsRef<Field>, if arrow were to implement std::convert::AsRef<Field> for Field.
I recognize that this is a convenience feature for a single crate, but as it is easy to implement, I wanted to give it a shot :)
Required impl:
impl std::convert::AsRef<Field> for Field{
fn as_ref(&self) -> &Field{
self
}
}Context: the Rust docs contain a section on implementing AsRef for you own types.
Metadata
Metadata
Assignees
Labels
enhancementAny new improvement worthy of a entry in the changelogAny new improvement worthy of a entry in the changelog