fixed test, now it doesn't use a fundemental type

i.e. `Box`, instead it now uses `Vec`
This commit is contained in:
Ozaren 2018-12-19 00:19:07 -05:00
parent db9fe1c86e
commit 7dd078f53f

View file

@ -32,12 +32,13 @@ impl<T> From<Foo<T>> for Box<T> {
}
*/
impl<T> Into<Box<T>> for Foo<T> {
fn into(self) -> Box<T> {
Box::new(self.t)
impl<T> Into<Vec<T>> for Foo<T> {
fn into(self) -> Vec<T> {
vec![self.t]
}
}
pub fn main() {
let _: Result<Box<i32>, !> = Foo { t: 10 }.try_into();
let _: Result<Vec<i32>, !> = Foo { t: 10 }.try_into();
}