remove unnecessary heap allocation

This commit is contained in:
XXIV
2023-09-01 05:22:22 +03:00
committed by GitHub
parent 2f5df8a94b
commit 9adc6a49aa
2 changed files with 2 additions and 2 deletions

View File

@@ -441,7 +441,7 @@ fn thin_lto(
for (i, (name, buffer)) in modules.into_iter().enumerate() {
info!("local module: {} - {}", i, name);
let cname = CString::new(name.clone()).unwrap();
let cname = CString::new(name.as_bytes()).unwrap();
thin_modules.push(llvm::ThinLTOModule {
identifier: cname.as_ptr(),
data: buffer.data().as_ptr(),