Hey another question...

I've written something like this:
```
impl Values {
fn from_iter(mut iter: impl Iterator<Item=f32>) -> Self {
...
}
}
```

is there a way to write it as an impl From<???> for Value ?

I haven't found a way to make it work...

1
Share
Share on Mastodon
Share on Twitter
Share on Facebook
Share on Linkedin
Soso

@corpsmoderne

```
impl Values {
fn from_iter(mut iter: impl IntoIterator<Item=f32>) -> Self {
...
}
}
```

Is probably what you are looking for?

doc.rust-lang.org/stable/std/i

1
10mo
Replies