Fix example for winnowing

This commit is contained in:
Bastian Kauschke 2020-05-02 15:56:33 +02:00 committed by Who? Me?!
parent 98e94be044
commit a8bb0c17f3
1 changed files with 8 additions and 4 deletions

View File

@ -192,11 +192,15 @@ trait Get {
} }
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))
}
} }
``` ```