File tree 9 files changed +13
-13
lines changed
9 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -748,7 +748,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
748
748
}
749
749
) ,
750
750
) ;
751
- return Ok ( ( ) ) ;
751
+ Ok ( ( ) )
752
752
}
753
753
754
754
/// Wake up some thread (if there is any) sleeping on the conditional
Original file line number Diff line number Diff line change @@ -849,7 +849,7 @@ trait EvalContextPrivExt<'tcx>: MiriInterpCxExt<'tcx> {
849
849
// https://github.com/rust-lang/miri/issues/1763). In this case,
850
850
// just do nothing, which effectively just returns to the
851
851
// scheduler.
852
- return Ok ( ( ) ) ;
852
+ Ok ( ( ) )
853
853
}
854
854
855
855
#[ inline]
Original file line number Diff line number Diff line change 33
33
clippy:: too_many_arguments,
34
34
clippy:: type_complexity,
35
35
clippy:: single_element_loop,
36
- clippy:: needless_return,
37
36
clippy:: bool_to_int_with_if,
38
37
clippy:: box_default,
39
38
clippy:: needless_question_mark,
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
71
71
// and not execute any Miri shim. Somewhat unintuitively doing so is done
72
72
// by returning `NotSupported`, which triggers the `lookup_exported_symbol`
73
73
// fallback case in `emulate_foreign_item`.
74
- return Ok ( EmulateItemResult :: NotSupported ) ;
74
+ Ok ( EmulateItemResult :: NotSupported )
75
75
}
76
76
AllocatorKind :: Default => {
77
77
default ( this) ?;
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
103
103
fn get_env_var ( & mut self , name : & OsStr ) -> InterpResult < ' tcx , Option < OsString > > {
104
104
let this = self . eval_context_ref ( ) ;
105
105
match & this. machine . env_vars {
106
- EnvVars :: Uninit => return Ok ( None ) ,
106
+ EnvVars :: Uninit => Ok ( None ) ,
107
107
EnvVars :: Unix ( vars) => vars. get ( this, name) ,
108
108
EnvVars :: Windows ( vars) => vars. get ( name) ,
109
109
}
Original file line number Diff line number Diff line change @@ -676,12 +676,12 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
676
676
this. write_bytes_ptr ( buf, bytes[ ..read_bytes] . iter ( ) . copied ( ) ) ?;
677
677
// The actual read size is always less than what got originally requested so this cannot fail.
678
678
this. write_int ( u64:: try_from ( read_bytes) . unwrap ( ) , dest) ?;
679
- return Ok ( ( ) ) ;
679
+ Ok ( ( ) )
680
680
}
681
681
Err ( e) => {
682
682
this. set_last_error_from_io_error ( e) ?;
683
683
this. write_int ( -1 , dest) ?;
684
- return Ok ( ( ) ) ;
684
+ Ok ( ( ) )
685
685
}
686
686
}
687
687
}
Original file line number Diff line number Diff line change @@ -596,7 +596,7 @@ fn ready_list_next(
596
596
return Some ( epoll_event_instance) ;
597
597
}
598
598
}
599
- return None ;
599
+ None
600
600
}
601
601
602
602
/// This helper function checks whether an epoll notification should be triggered for a specific
@@ -623,9 +623,10 @@ fn check_and_update_one_event_interest<'tcx>(
623
623
let event_instance = EpollEventInstance :: new ( flags, epoll_event_interest. data ) ;
624
624
// Triggers the notification by inserting it to the ready list.
625
625
ready_list. insert ( epoll_key, event_instance) ;
626
- return Ok ( true ) ;
626
+ Ok ( true )
627
+ } else {
628
+ Ok ( false )
627
629
}
628
- return Ok ( false ) ;
629
630
}
630
631
631
632
/// Callback function after epoll_wait unblocks
Original file line number Diff line number Diff line change @@ -23,8 +23,8 @@ pub fn is_dyn_sym(name: &str) -> bool {
23
23
24
24
#[ cfg( windows) ]
25
25
fn win_absolute < ' tcx > ( path : & Path ) -> InterpResult < ' tcx , io:: Result < PathBuf > > {
26
- // We are on Windows so we can simply lte the host do this.
27
- return Ok ( path:: absolute ( path) ) ;
26
+ // We are on Windows so we can simply let the host do this.
27
+ Ok ( path:: absolute ( path) )
28
28
}
29
29
30
30
#[ cfg( unix) ]
Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
90
90
}
91
91
) ,
92
92
) ;
93
- return Ok ( ( ) ) ;
93
+ Ok ( ( ) )
94
94
}
95
95
96
96
fn InitOnceComplete (
You can’t perform that action at this time.
0 commit comments