Skip to content

Commit dab430b

Browse files
the8472bjorn3
andcommitted
from review: improve method name
Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>
1 parent c4a1d5d commit dab430b

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Diff for: library/alloc/src/vec/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2637,7 +2637,7 @@ impl<T, A: Allocator> Vec<T, A> {
26372637
/// The bound `I: TrustedLen` ensures that the caller can safely know
26382638
/// how much needs to be allocated.
26392639
#[cfg(not(no_global_oom_handling))]
2640-
unsafe fn extend_prealloc_trustedlen<I: TrustedLen<Item = T>>(&mut self, iterator: I) {
2640+
unsafe fn extend_prealloc_trusted_len<I: TrustedLen<Item = T>>(&mut self, iterator: I) {
26412641
unsafe {
26422642
let mut ptr = self.as_mut_ptr().add(self.len());
26432643
let mut local_len = SetLenOnDrop::new(&mut self.len);

Diff for: library/alloc/src/vec/spec_extend.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ where
3636
// Safety: We rely on the TrustedLen contract to know how much capacity needs to be
3737
// reserved. And we reserved at least that amount above.
3838
unsafe {
39-
self.extend_prealloc_trustedlen(iterator);
39+
self.extend_prealloc_trusted_len(iterator);
4040
}
4141
} else {
4242
// Per TrustedLen contract a `None` upper bound means that the iterator length

Diff for: library/alloc/src/vec/spec_from_iter_nested.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ where
5555
// Safety: The TrustedLen contract together with the `with_capacity`
5656
// above guarantee that no further allocations should be needed to collect the iterator
5757
unsafe {
58-
vector.extend_prealloc_trustedlen(iterator);
58+
vector.extend_prealloc_trusted_len(iterator);
5959
}
6060
vector
6161
}

0 commit comments

Comments
 (0)