@@ -6,21 +6,21 @@ use crate::coverageinfo::ffi;
66use crate :: llvm;
77
88pub ( crate ) fn covmap_var_name ( ) -> CString {
9- CString :: new ( llvm:: build_byte_buffer ( |s| unsafe {
9+ CString :: new ( llvm:: build_byte_buffer ( |s| {
1010 llvm:: LLVMRustCoverageWriteCovmapVarNameToString ( s) ;
1111 } ) )
1212 . expect ( "covmap variable name should not contain NUL" )
1313}
1414
1515pub ( crate ) fn covmap_section_name ( llmod : & llvm:: Module ) -> CString {
16- CString :: new ( llvm:: build_byte_buffer ( |s| unsafe {
16+ CString :: new ( llvm:: build_byte_buffer ( |s| {
1717 llvm:: LLVMRustCoverageWriteCovmapSectionNameToString ( llmod, s) ;
1818 } ) )
1919 . expect ( "covmap section name should not contain NUL" )
2020}
2121
2222pub ( crate ) fn covfun_section_name ( llmod : & llvm:: Module ) -> CString {
23- CString :: new ( llvm:: build_byte_buffer ( |s| unsafe {
23+ CString :: new ( llvm:: build_byte_buffer ( |s| {
2424 llvm:: LLVMRustCoverageWriteCovfunSectionNameToString ( llmod, s) ;
2525 } ) )
2626 . expect ( "covfun section name should not contain NUL" )
@@ -95,5 +95,5 @@ pub(crate) fn hash_bytes(bytes: &[u8]) -> u64 {
9595/// as a raw numeric value. For historical reasons, the numeric value is 1 less
9696/// than the number in the version's name, so `Version7` is actually `6u32`.
9797pub ( crate ) fn mapping_version ( ) -> u32 {
98- unsafe { llvm:: LLVMRustCoverageMappingVersion ( ) }
98+ llvm:: LLVMRustCoverageMappingVersion ( )
9999}
0 commit comments