File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -898,7 +898,7 @@ impl Function {
898
898
/// `None`.
899
899
pub fn try_from ( val : & JsValue ) -> Option < & Function > {
900
900
if val. is_function ( ) {
901
- Some ( unsafe { mem :: transmute ( val) } )
901
+ Some ( val. unchecked_ref ( ) )
902
902
} else {
903
903
None
904
904
}
@@ -2153,7 +2153,7 @@ impl Object {
2153
2153
/// `None`.
2154
2154
pub fn try_from ( val : & JsValue ) -> Option < & Object > {
2155
2155
if val. is_object ( ) {
2156
- Some ( unsafe { mem :: transmute ( val) } )
2156
+ Some ( val. unchecked_ref ( ) )
2157
2157
} else {
2158
2158
None
2159
2159
}
@@ -3588,7 +3588,7 @@ impl JsString {
3588
3588
/// `None`.
3589
3589
pub fn try_from ( val : & JsValue ) -> Option < & JsString > {
3590
3590
if val. is_string ( ) {
3591
- Some ( unsafe { mem :: transmute ( val) } )
3591
+ Some ( val. unchecked_ref ( ) )
3592
3592
} else {
3593
3593
None
3594
3594
}
You can’t perform that action at this time.
0 commit comments