File tree Expand file tree Collapse file tree 3 files changed +3
-12
lines changed Expand file tree Collapse file tree 3 files changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -85,9 +85,6 @@ intrinsics! {
85
85
#[ symbol = "__wbindgen_is_string" ]
86
86
#[ signature = fn ( ref_anyref( ) ) -> Boolean ]
87
87
IsString ,
88
- #[ symbol = "__wbindgen_is_truthy" ]
89
- #[ signature = fn ( ref_anyref( ) ) -> Boolean ]
90
- IsTruthy ,
91
88
#[ symbol = "__wbindgen_is_falsy" ]
92
89
#[ signature = fn ( ref_anyref( ) ) -> Boolean ]
93
90
IsFalsy ,
Original file line number Diff line number Diff line change @@ -2299,11 +2299,6 @@ impl<'a> Context<'a> {
2299
2299
format ! ( "typeof({}) === 'string'" , args[ 0 ] )
2300
2300
}
2301
2301
2302
- Intrinsic :: IsTruthy => {
2303
- assert_eq ! ( args. len( ) , 1 ) ;
2304
- format ! ( "!!{}" , args[ 0 ] )
2305
- }
2306
-
2307
2302
Intrinsic :: IsFalsy => {
2308
2303
assert_eq ! ( args. len( ) , 1 ) ;
2309
2304
format ! ( "!{}" , args[ 0 ] )
Original file line number Diff line number Diff line change @@ -333,15 +333,15 @@ impl JsValue {
333
333
}
334
334
335
335
/// Tests whether the value is ["truthy"].
336
- ///
336
+ ///
337
337
/// ["truthy"]: https://developer.mozilla.org/en-US/docs/Glossary/Truthy
338
338
#[ inline]
339
339
pub fn is_truthy ( & self ) -> bool {
340
- unsafe { __wbindgen_is_truthy ( self . idx ) == 1 }
340
+ ! self . is_falsy ( )
341
341
}
342
342
343
343
/// Tests whether the value is ["falsy"].
344
- ///
344
+ ///
345
345
/// ["falsy"]: https://developer.mozilla.org/en-US/docs/Glossary/Falsy
346
346
#[ inline]
347
347
pub fn is_falsy ( & self ) -> bool {
@@ -518,7 +518,6 @@ externs! {
518
518
fn __wbindgen_is_object( idx: u32 ) -> u32 ;
519
519
fn __wbindgen_is_function( idx: u32 ) -> u32 ;
520
520
fn __wbindgen_is_string( idx: u32 ) -> u32 ;
521
- fn __wbindgen_is_truthy( idx: u32 ) -> u32 ;
522
521
fn __wbindgen_is_falsy( idx: u32 ) -> u32 ;
523
522
524
523
fn __wbindgen_number_get( idx: u32 , invalid: * mut u8 ) -> f64 ;
You can’t perform that action at this time.
0 commit comments