File tree Expand file tree Collapse file tree 5 files changed +7
-10
lines changed Expand file tree Collapse file tree 5 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,6 @@ rustflags = [
4343 " -Wclippy::map_err_ignore" ,
4444 " -Wclippy::map_flatten" ,
4545 " -Wclippy::map_unwrap_or" ,
46- " -Wclippy::match_on_vec_items" ,
4746 " -Wclippy::match_same_arms" ,
4847 " -Wclippy::match_wild_err_arm" ,
4948 " -Wclippy::match_wildcard_for_single_variants" ,
Original file line number Diff line number Diff line change @@ -36,9 +36,9 @@ pub fn write_stderr(s: &'static str) {
3636
3737cfg_if:: cfg_if! {
3838 if #[ cfg( all( unix, not( target_os = "macos" ) ) ) ] {
39- /// The sole purpose of the unix module is to hook pthread_create to ensure
39+ /// The sole purpose of the unix module is to hook ` pthread_create` to ensure
4040 /// an alternate stack is installed for every native thread in case of a
41- /// stack overflow. This doesn't apply to MacOS as it uses exception ports,
41+ /// stack overflow. This doesn't apply to ` MacOS` as it uses exception ports,
4242 /// which are always delivered to a specific thread owned by the exception
4343 /// handler
4444 pub mod unix;
Original file line number Diff line number Diff line change @@ -101,15 +101,14 @@ fn make_dump_path(id: &str) -> PathBuf {
101101pub fn spinup_server ( id : & str , dump_path : Option < PathBuf > ) -> Server {
102102 let dump_path = dump_path. unwrap_or_else ( || make_dump_path ( id) ) ;
103103
104- if dump_path. exists ( ) {
105- if let Err ( e) = std:: fs:: remove_file ( & dump_path) {
104+ if dump_path. exists ( )
105+ && let Err ( e) = std:: fs:: remove_file ( & dump_path) {
106106 panic ! (
107107 "failed to remove existing dump file {}: {}" ,
108108 dump_path. display( ) ,
109109 e
110110 ) ;
111111 }
112- }
113112
114113 let mut server = minidumper:: Server :: with_name ( id) . expect ( "failed to start server" ) ;
115114
Original file line number Diff line number Diff line change @@ -21,11 +21,10 @@ fn main() {
2121
2222 let dump_path = std:: path:: PathBuf :: from ( format ! ( "dumps/{uuid}.dmp" ) ) ;
2323
24- if let Some ( dir) = dump_path. parent ( ) {
25- if !dir. try_exists ( ) ? {
24+ if let Some ( dir) = dump_path. parent ( )
25+ && !dir. try_exists ( ) ? {
2626 std:: fs:: create_dir_all ( dir) ?;
2727 }
28- }
2928 let file = std:: fs:: File :: create ( & dump_path) ?;
3029 Ok ( ( file, dump_path) )
3130 }
Original file line number Diff line number Diff line change @@ -472,7 +472,7 @@ impl Server {
472472 // many layers, so really, we are falling back on Windows to actually correctly handle
473473 // if the interior pointers have become invalid which it should? do ok with
474474 let result =
475- minidump_writer:: minidump_writer:: MinidumpWriter :: dump_crash_context( crash_context, None , & mut minidump_file) ;
475+ minidump_writer:: minidump_writer:: MinidumpWriter :: dump_crash_context( & crash_context, None , & mut minidump_file) ;
476476 } else if #[ cfg( target_os = "macos" ) ] {
477477 let mut writer = minidump_writer:: minidump_writer:: MinidumpWriter :: with_crash_context( crash_context) ;
478478 let result = writer. dump( & mut minidump_file) ;
You can’t perform that action at this time.
0 commit comments