File tree Expand file tree Collapse file tree 8 files changed +16
-24
lines changed Expand file tree Collapse file tree 8 files changed +16
-24
lines changed Original file line number Diff line number Diff line change @@ -450,9 +450,8 @@ fn method<'gc>(
450450 return Ok ( this. into ( ) ) ;
451451 }
452452
453- let this = match this. native ( ) {
454- NativeObject :: BevelFilter ( bevel_filter) => bevel_filter,
455- _ => return Ok ( Value :: Undefined ) ,
453+ let NativeObject :: BevelFilter ( this) = this. native ( ) else {
454+ return Ok ( Value :: Undefined ) ;
456455 } ;
457456
458457 Ok ( match index {
Original file line number Diff line number Diff line change @@ -160,9 +160,8 @@ fn method<'gc>(
160160 return Ok ( this. into ( ) ) ;
161161 }
162162
163- let this = match this. native ( ) {
164- NativeObject :: BlurFilter ( blur_filter) => blur_filter,
165- _ => return Ok ( Value :: Undefined ) ,
163+ let NativeObject :: BlurFilter ( this) = this. native ( ) else {
164+ return Ok ( Value :: Undefined ) ;
166165 } ;
167166
168167 Ok ( match index {
Original file line number Diff line number Diff line change @@ -145,9 +145,8 @@ fn method<'gc>(
145145 return Ok ( this. into ( ) ) ;
146146 }
147147
148- let this = match this. native ( ) {
149- NativeObject :: ColorMatrixFilter ( color_matrix_filter) => color_matrix_filter,
150- _ => return Ok ( Value :: Undefined ) ,
148+ let NativeObject :: ColorMatrixFilter ( this) = this. native ( ) else {
149+ return Ok ( Value :: Undefined ) ;
151150 } ;
152151
153152 Ok ( match index {
Original file line number Diff line number Diff line change @@ -357,9 +357,8 @@ fn method<'gc>(
357357 return Ok ( this. into ( ) ) ;
358358 }
359359
360- let this = match this. native ( ) {
361- NativeObject :: ConvolutionFilter ( convolution_filter) => convolution_filter,
362- _ => return Ok ( Value :: Undefined ) ,
360+ let NativeObject :: ConvolutionFilter ( this) = this. native ( ) else {
361+ return Ok ( Value :: Undefined ) ;
363362 } ;
364363
365364 Ok ( match index {
Original file line number Diff line number Diff line change @@ -454,9 +454,8 @@ fn method<'gc>(
454454 _ => { }
455455 }
456456
457- let date_ref = match this. native ( ) {
458- NativeObject :: Date ( date) => date,
459- _ => return Ok ( Value :: Undefined ) ,
457+ let NativeObject :: Date ( date_ref) = this. native ( ) else {
458+ return Ok ( Value :: Undefined ) ;
460459 } ;
461460 let date = date_ref. get ( ) ;
462461
Original file line number Diff line number Diff line change @@ -346,9 +346,8 @@ fn method<'gc>(
346346 return Ok ( this. into ( ) ) ;
347347 }
348348
349- let this = match this. native ( ) {
350- NativeObject :: DisplacementMapFilter ( displacement_map_filter) => displacement_map_filter,
351- _ => return Ok ( Value :: Undefined ) ,
349+ let NativeObject :: DisplacementMapFilter ( this) = this. native ( ) else {
350+ return Ok ( Value :: Undefined ) ;
352351 } ;
353352
354353 Ok ( match index {
Original file line number Diff line number Diff line change @@ -373,9 +373,8 @@ fn method<'gc>(
373373 return Ok ( this. into ( ) ) ;
374374 }
375375
376- let this = match this. native ( ) {
377- NativeObject :: DropShadowFilter ( drop_shadow_filter) => drop_shadow_filter,
378- _ => return Ok ( Value :: Undefined ) ,
376+ let NativeObject :: DropShadowFilter ( this) = this. native ( ) else {
377+ return Ok ( Value :: Undefined ) ;
379378 } ;
380379
381380 Ok ( match index {
Original file line number Diff line number Diff line change @@ -295,9 +295,8 @@ fn method<'gc>(
295295 return Ok ( this. into ( ) ) ;
296296 }
297297
298- let this = match this. native ( ) {
299- NativeObject :: GlowFilter ( glow_filter) => glow_filter,
300- _ => return Ok ( Value :: Undefined ) ,
298+ let NativeObject :: GlowFilter ( this) = this. native ( ) else {
299+ return Ok ( Value :: Undefined ) ;
301300 } ;
302301
303302 Ok ( match index {
You can’t perform that action at this time.
0 commit comments