File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -143,7 +143,10 @@ impl Compiler {
143
143
pub unsafe fn new_with_pe_signatures ( ) -> Self {
144
144
let mut this = Self :: new_without_pe_module ( ) ;
145
145
146
- let _r = this. add_module ( crate :: module:: Pe :: new_with_signatures ( ) ) ;
146
+ let _r = this. add_module (
147
+ // Safety: guaranteed by the safety contract of this function
148
+ unsafe { crate :: module:: Pe :: new_with_signatures ( ) } ,
149
+ ) ;
147
150
148
151
this
149
152
}
Original file line number Diff line number Diff line change 51
51
#![ deny( unused_lifetimes) ]
52
52
#![ deny( unused_qualifications) ]
53
53
#![ deny( unused_results) ]
54
+ #![ deny( unsafe_op_in_unsafe_fn) ]
54
55
// Do the same for clippy
55
56
#![ deny( clippy:: all) ]
56
57
#![ deny( clippy:: pedantic) ]
Original file line number Diff line number Diff line change @@ -1139,7 +1139,10 @@ impl Pe {
1139
1139
#[ cfg( feature = "authenticode" ) ]
1140
1140
pub unsafe fn new_with_signatures ( ) -> Self {
1141
1141
Self {
1142
- token : Some ( authenticode_parser:: InitializationToken :: new ( ) ) ,
1142
+ token : Some (
1143
+ // Safety: guaranteed by the safety contract of this function
1144
+ unsafe { authenticode_parser:: InitializationToken :: new ( ) } ,
1145
+ ) ,
1143
1146
}
1144
1147
}
1145
1148
You can’t perform that action at this time.
0 commit comments