Skip to content

Commit 73d7734

Browse files
committed
fmt, change to cold
1 parent f5e3710 commit 73d7734

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

library/alloc/src/raw_vec.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,12 @@ impl<T, A: Allocator> RawVec<T, A> {
321321
// Therefore, we move all the resizing and error-handling logic from grow_amortized and
322322
// handle_reserve behind a call, while making sure that the this function is likely to be
323323
// inlined as just a comparison and a call if the comparison fails.
324-
#[inline(never)]
325-
fn do_reserve_and_handle<T, A: Allocator>(slf: &mut RawVec<T,A>, len: usize, additional: usize) {
324+
#[cold]
325+
fn do_reserve_and_handle<T, A: Allocator>(
326+
slf: &mut RawVec<T, A>,
327+
len: usize,
328+
additional: usize,
329+
) {
326330
handle_reserve(slf.grow_amortized(len, additional));
327331
}
328332

0 commit comments

Comments
 (0)