| 1 | use inplace_vec_builderrust-analyzer cargo inplace-vec-builder 0.1.1 crate/::InPlaceVecBuilderrust-analyzer cargo inplace-vec-builder 0.1.1 vec_builder/InPlaceVecBuilder#; |
| 2 | |
| 3 | struct Collectionrust-analyzer cargo inplace-vec-builder 0.1.1 Collection# { |
| 4 | elementsrust-analyzer cargo inplace-vec-builder 0.1.1 Collection#elements.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<u32>, |
| 5 | } |
| 6 | |
| 7 | impl Collectionrust-analyzer cargo inplace-vec-builder 0.1.1 Collection# { |
| 8 | fn oprust-analyzer cargo inplace-vec-builder 0.1.1 impl#[Collection]op().(&mut self) { |
| 9 | let mut res = self |
| 10 | .elementsrust-analyzer cargo inplace-vec-builder 0.1.1 Collection#elements. |
| 11 | .iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().() |
| 12 | .filterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#filter().(|x| *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().x rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().5) |
| 13 | .maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#map().(|x| *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().x rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().2) |
| 14 | .chainrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#chain().(stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/::oncerust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/sources/once/once().(123)) |
| 15 | .collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().(); |
| 16 | stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::memrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/::swaprust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/swap().(&mut self.elementsrust-analyzer cargo inplace-vec-builder 0.1.1 Collection#elements., &mut res); |
| 17 | } |
| 18 | |
| 19 | fn inplace_oprust-analyzer cargo inplace-vec-builder 0.1.1 impl#[Collection]inplace_op().(&mut self) { |
| 20 | let mut t = InPlaceVecBuilderrust-analyzer cargo inplace-vec-builder 0.1.1 vec_builder/InPlaceVecBuilder#::fromrust-analyzer cargo inplace-vec-builder 0.1.1 vec_builder/impl#[`InPlaceVecBuilder<'a, T>`][`From<&'a mut Vec<T>>`]from().(&mut self.elementsrust-analyzer cargo inplace-vec-builder 0.1.1 Collection#elements.); |
| 21 | while let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(elem) = t.pop_frontrust-analyzer cargo inplace-vec-builder 0.1.1 vec_builder/impl#[`InPlaceVecBuilder<'a, T>`]pop_front().() { |
| 22 | if elem rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().5 { |
| 23 | t.pushrust-analyzer cargo inplace-vec-builder 0.1.1 vec_builder/impl#[`InPlaceVecBuilder<'a, T>`]push().(elem rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().2); |
| 24 | } |
| 25 | } |
| 26 | t.pushrust-analyzer cargo inplace-vec-builder 0.1.1 vec_builder/impl#[`InPlaceVecBuilder<'a, T>`]push().(123); |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | fn mainrust-analyzer cargo inplace-vec-builder 0.1.1 main().() { |
| 31 | let mut x = Collectionrust-analyzer cargo inplace-vec-builder 0.1.1 Collection# { |
| 32 | elementsrust-analyzer cargo inplace-vec-builder 0.1.1 Collection#elements.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`]new().(), |
| 33 | }; |
| 34 | x.oprust-analyzer cargo inplace-vec-builder 0.1.1 impl#[Collection]op().(); |
| 35 | x.inplace_oprust-analyzer cargo inplace-vec-builder 0.1.1 impl#[Collection]inplace_op().(); |
| 36 | } |