Fix example for winnowing
This commit is contained in:
parent
5aad3d043d
commit
e5dbc6f534
|
|
@ -191,12 +191,16 @@ trait Get {
|
||||||
fn get(&self) -> Self;
|
fn get(&self) -> Self;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T:Copy> Get for T {
|
impl<T: Copy> Get for T {
|
||||||
fn get(&self) -> T { *self }
|
fn get(&self) -> T {
|
||||||
|
*self
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T:Get> Get for Box<T> {
|
impl<T: Get> Get for Box<T> {
|
||||||
fn get(&self) -> Box<T> { Box::new(get_it(&**self)) }
|
fn get(&self) -> Box<T> {
|
||||||
|
Box::new(<T>::get(self))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue