@@ -6,21 +6,21 @@ use crate::coverageinfo::ffi;
6
6
use crate :: llvm;
7
7
8
8
pub ( crate ) fn covmap_var_name ( ) -> CString {
9
- CString :: new ( llvm:: build_byte_buffer ( |s| unsafe {
9
+ CString :: new ( llvm:: build_byte_buffer ( |s| {
10
10
llvm:: LLVMRustCoverageWriteCovmapVarNameToString ( s) ;
11
11
} ) )
12
12
. expect ( "covmap variable name should not contain NUL" )
13
13
}
14
14
15
15
pub ( 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| {
17
17
llvm:: LLVMRustCoverageWriteCovmapSectionNameToString ( llmod, s) ;
18
18
} ) )
19
19
. expect ( "covmap section name should not contain NUL" )
20
20
}
21
21
22
22
pub ( 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| {
24
24
llvm:: LLVMRustCoverageWriteCovfunSectionNameToString ( llmod, s) ;
25
25
} ) )
26
26
. expect ( "covfun section name should not contain NUL" )
@@ -95,5 +95,5 @@ pub(crate) fn hash_bytes(bytes: &[u8]) -> u64 {
95
95
/// as a raw numeric value. For historical reasons, the numeric value is 1 less
96
96
/// than the number in the version's name, so `Version7` is actually `6u32`.
97
97
pub ( crate ) fn mapping_version ( ) -> u32 {
98
- unsafe { llvm:: LLVMRustCoverageMappingVersion ( ) }
98
+ llvm:: LLVMRustCoverageMappingVersion ( )
99
99
}
0 commit comments