A wrapper struct that implements Extend
for mutable references.
use extend_ref::ExtendRef; fn unzip_on_refs( squares: &mut impl Extend<i32>, cubes: &mut impl Extend<i32>, tesseracts: &mut impl Extend<i32> ) { // Create an iterator of a 3-tuple let iter = (0i32..10).map(|i| (i * i, i.pow(3), i.pow(4))); // Unzip the iterator into the three referenced collections (ExtendRef(squares), ExtendRef(cubes), ExtendRef(tesseracts)).extend(iter); }
Licensed under Apache License, Version 2.0 (LICENSE or https://www.apache.org/licenses/LICENSE-2.0).
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4