Skip to content

Commit 7dd078f

Browse files
committed
fixed test, now it doesn't use a fundemental type
i.e. `Box`, instead it now uses `Vec`
1 parent db9fe1c commit 7dd078f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/test/run-pass/try_from.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,13 @@ impl<T> From<Foo<T>> for Box<T> {
3232
}
3333
*/
3434

35-
impl<T> Into<Box<T>> for Foo<T> {
36-
fn into(self) -> Box<T> {
37-
Box::new(self.t)
35+
impl<T> Into<Vec<T>> for Foo<T> {
36+
fn into(self) -> Vec<T> {
37+
vec![self.t]
3838
}
3939
}
4040

4141
pub fn main() {
42-
let _: Result<Box<i32>, !> = Foo { t: 10 }.try_into();
42+
let _: Result<Vec<i32>, !> = Foo { t: 10 }.try_into();
4343
}
44+

0 commit comments

Comments
 (0)