@@ -1250,8 +1250,7 @@ impl Vm {
1250
1250
} ) ;
1251
1251
}
1252
1252
1253
- let value = vm_try ! ( self . stack. pop( ) ) ;
1254
- vm_try ! ( <( ) >:: from_value( value) ) ;
1253
+ vm_try ! ( <( ) >:: from_value( vm_try!( self . stack. pop( ) ) ) ) ;
1255
1254
VmResult :: Ok ( ( ) )
1256
1255
}
1257
1256
}
@@ -1444,8 +1443,7 @@ impl Vm {
1444
1443
1445
1444
#[ cfg_attr( feature = "bench" , inline( never) ) ]
1446
1445
fn op_await ( & mut self ) -> VmResult < Shared < Future > > {
1447
- let value = vm_try ! ( self . stack. pop( ) ) ;
1448
- value. into_future ( )
1446
+ vm_try ! ( self . stack. pop( ) ) . into_future ( )
1449
1447
}
1450
1448
1451
1449
#[ cfg_attr( feature = "bench" , inline( never) ) ]
@@ -1945,9 +1943,7 @@ impl Vm {
1945
1943
let target = vm_try ! ( self . stack. pop( ) ) ;
1946
1944
let value = vm_try ! ( self . stack. pop( ) ) ;
1947
1945
1948
- // This is a useful pattern.
1949
- #[ allow( clippy:: never_loop) ]
1950
- loop {
1946
+ ' out: {
1951
1947
// NB: local storage for string.
1952
1948
let local_field;
1953
1949
@@ -1957,7 +1953,7 @@ impl Vm {
1957
1953
local_field. as_str ( )
1958
1954
}
1959
1955
Value :: StaticString ( string) => string. as_ref ( ) ,
1960
- _ => break ,
1956
+ _ => break ' out ,
1961
1957
} ;
1962
1958
1963
1959
match & target {
@@ -1994,9 +1990,7 @@ impl Vm {
1994
1990
target : variant. type_info ( ) ,
1995
1991
} ) ;
1996
1992
}
1997
- _ => {
1998
- break ;
1999
- }
1993
+ _ => { }
2000
1994
}
2001
1995
}
2002
1996
@@ -2010,8 +2004,6 @@ impl Vm {
2010
2004
} ) ;
2011
2005
}
2012
2006
2013
- // Calling index set should not produce a value on the stack, but all
2014
- // handler functions to produce a value. So pop it here.
2015
2007
vm_try ! ( <( ) >:: from_value( vm_try!( self . stack. pop( ) ) ) ) ;
2016
2008
VmResult :: Ok ( ( ) )
2017
2009
}
@@ -3048,12 +3040,10 @@ impl Vm {
3048
3040
}
3049
3041
Inst :: Await => {
3050
3042
let future = vm_try ! ( self . op_await( ) ) ;
3051
- // NB: the future itself will advance the virtual machine.
3052
3043
return VmResult :: Ok ( VmHalt :: Awaited ( Awaited :: Future ( future) ) ) ;
3053
3044
}
3054
3045
Inst :: Select { len } => {
3055
3046
if let Some ( select) = vm_try ! ( self . op_select( len) ) {
3056
- // NB: the future itself will advance the virtual machine.
3057
3047
return VmResult :: Ok ( VmHalt :: Awaited ( Awaited :: Select ( select) ) ) ;
3058
3048
}
3059
3049
}
0 commit comments