mod cow;
#[cfg(not(no_global_oom_handling))]
-pub(crate) use self::into_iter::AsIntoIter;
+pub(crate) use self::in_place_collect::AsVecIntoIter;
#[stable(feature = "rust1", since = "1.0.0")]
pub use self::into_iter::IntoIter;
mod is_zero;
#[cfg(not(no_global_oom_handling))]
-mod source_iter_marker;
+mod in_place_collect;
mod partial_eq;
/// vec.extend([1, 2, 3].iter().copied());
///
/// for x in &vec {
-/// println!("{}", x);
+/// println!("{x}");
/// }
/// assert_eq!(vec, [7, 1, 2, 3]);
/// ```
///
/// while let Some(top) = stack.pop() {
/// // Prints 3, 2, 1
-/// println!("{}", top);
+/// println!("{top}");
/// }
/// ```
///
#[cold]
#[inline(never)]
fn assert_failed(index: usize, len: usize) -> ! {
- panic!("swap_remove index (is {}) should be < len (is {})", index, len);
+ panic!("swap_remove index (is {index}) should be < len (is {len})");
}
let len = self.len();
#[cold]
#[inline(never)]
fn assert_failed(index: usize, len: usize) -> ! {
- panic!("insertion index (is {}) should be <= len (is {})", index, len);
+ panic!("insertion index (is {index}) should be <= len (is {len})");
}
let len = self.len();
#[inline(never)]
#[track_caller]
fn assert_failed(index: usize, len: usize) -> ! {
- panic!("removal index (is {}) should be < len (is {})", index, len);
+ panic!("removal index (is {index}) should be < len (is {len})");
}
let len = self.len();
/// Retains only the elements specified by the predicate.
///
- /// In other words, remove all elements `e` such that `f(&e)` returns `false`.
+ /// In other words, remove all elements `e` for which `f(&e)` returns `false`.
/// This method operates in place, visiting each element exactly once in the
/// original order, and preserves the order of the retained elements.
///
#[cold]
#[inline(never)]
fn assert_failed(at: usize, len: usize) -> ! {
- panic!("`at` split index (is {}) should be <= len (is {})", at, len);
+ panic!("`at` split index (is {at}) should be <= len (is {len})");
}
if at > self.len() {
/// let v = vec!["a".to_string(), "b".to_string()];
/// for s in v.into_iter() {
/// // s has type String, not &String
- /// println!("{}", s);
+ /// println!("{s}");
/// }
/// ```
#[inline]