Skip to content

Commit 79801a8

Browse files
perf: use reserve_exact
Co-authored-by: Florian Engelhardt <[email protected]>
1 parent 17dcae6 commit 79801a8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

profiling/src/profiling/stack_walking.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ pub fn extract_function_name(func: &zend_function) -> Option<Cow<'static, str>>
7373
let (has_module, has_class) = (!module_name.is_empty(), !class_name.is_empty());
7474
let module_len = has_module as usize * "|".len() + module_name.len();
7575
let class_name_len = has_class as usize * "::".len() + class_name.len();
76-
buffer.reserve(module_len + class_name_len + method_name.len());
76+
buffer.reserve_exact(module_len + class_name_len + method_name.len());
7777

7878
if has_module {
7979
buffer.extend_from_slice(module_name);

0 commit comments

Comments
 (0)