mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 14:01:51 +00:00
24 lines
528 B
Rust
24 lines
528 B
Rust
//@ check-pass
|
|
|
|
pub struct VecNumber<'s> {
|
|
pub vec_number: Vec<Number<'s>>,
|
|
pub auxiliary_object: &'s Vec<usize>,
|
|
}
|
|
|
|
pub struct Number<'s> {
|
|
pub number: &'s usize,
|
|
}
|
|
|
|
impl<'s> VecNumber<'s> {
|
|
pub fn vec_number_iterable_per_item_in_auxiliary_object(
|
|
&self,
|
|
) -> impl Iterator<Item = (&'s usize, impl Iterator<Item = &Number<'s>>)> {
|
|
self.auxiliary_object.iter().map(move |n| {
|
|
let iter_number = self.vec_number.iter();
|
|
(n, iter_number)
|
|
})
|
|
}
|
|
}
|
|
|
|
fn main() {}
|