File tree Expand file tree Collapse file tree 2 files changed +11
-11
lines changed
Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -26,13 +26,13 @@ impl<'js> FromJs<'js> for Argument<'js> {
2626 return Ok ( Argument :: Real ( float) ) ;
2727 } else if let Some ( string) = value. as_string ( ) {
2828 return Ok ( Argument :: Text ( CString :: from_string ( string. clone ( ) ) ?) ) ;
29- } else if let Some ( object) = value. as_object ( ) {
30- if object. as_typed_array :: < u8 > ( ) . is_some ( ) {
31- // Lifetime issue: https://github.com/DelSkayn/rquickjs/issues/356
32- return Ok ( Argument :: Blob ( CVec :: from_array (
33- TypedArray :: < u8 > :: from_value ( value . clone ( ) ) . or_throw ( ctx ) ? ,
34- ) ? ) ) ;
35- }
29+ } else if let Some ( object) = value. as_object ( )
30+ && object. as_typed_array :: < u8 > ( ) . is_some ( )
31+ {
32+ // Lifetime issue: https://github.com/DelSkayn/rquickjs/issues/356
33+ return Ok ( Argument :: Blob ( CVec :: from_array (
34+ TypedArray :: < u8 > :: from_value ( value . clone ( ) ) . or_throw ( ctx ) ? ,
35+ ) ? ) ) ;
3636 }
3737 Err ( Exception :: throw_type (
3838 ctx,
Original file line number Diff line number Diff line change @@ -57,10 +57,10 @@ impl URLSearchParams {
5757 let mut data = Vec :: new ( ) ;
5858 loop {
5959 let next = ( This ( iterable. clone ( ) ) , 2 ) . apply :: < Object < ' _ > > ( & next_fn) ?;
60- if let Ok ( done) = next. get :: < _ , bool > ( PredefinedAtom :: Done ) {
61- if done {
62- break ;
63- }
60+ if let Ok ( done) = next. get :: < _ , bool > ( PredefinedAtom :: Done )
61+ && done
62+ {
63+ break ;
6464 }
6565 let value = next. get :: < _ , Array < ' _ > > ( "value" ) ?;
6666 let name = value. get :: < Coerced < String > > ( 0 ) ?;
You can’t perform that action at this time.
0 commit comments