Implement From, not Into
This commit is contained in:
parent
2d5be08822
commit
8bc7c76088
|
@ -21,6 +21,9 @@
|
|||
|
||||
- Implement `Default` on `Map` (not just on `RawMap`)
|
||||
|
||||
- The implementation of `Into<RawMap<A>>` for `Map<A>` has been
|
||||
replaced with the more general `From<Map<A>>` for `RawMap<A>`.
|
||||
|
||||
- Worked around the spurious `where_clauses_object_safety` future-compatibility lint that has been raised since mid-2018.
|
||||
If you put `#![allow(where_clauses_object_safety)]` on your binary crates for this reason, you can remove it.
|
||||
|
||||
|
|
|
@ -236,10 +236,10 @@ impl<A: ?Sized + UncheckedAnyExt> AsMut<RawMap<A>> for Map<A> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<A: ?Sized + UncheckedAnyExt> Into<RawMap<A>> for Map<A> {
|
||||
impl<A: ?Sized + UncheckedAnyExt> From<Map<A>> for RawMap<A> {
|
||||
#[inline]
|
||||
fn into(self) -> RawMap<A> {
|
||||
self.raw
|
||||
fn from(map: Map<A>) -> RawMap<A> {
|
||||
map.raw
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue