@@ -408,7 +408,7 @@ impl JsObject {
408408 let get = if let Some ( getter) = self . try_get ( js_string ! ( "get" ) , context) ? {
409409 // b. If IsCallable(getter) is false and getter is not undefined, throw a TypeError exception.
410410 // todo: extract IsCallable to be callable from Value
411- if !getter. is_undefined ( ) && getter. as_object ( ) . map_or ( true , |o| !o. is_callable ( ) ) {
411+ if !getter. is_undefined ( ) && getter. as_object ( ) . is_none_or ( |o| !o. is_callable ( ) ) {
412412 return Err ( JsNativeError :: typ ( )
413413 . with_message ( "Property descriptor getter must be callable" )
414414 . into ( ) ) ;
@@ -425,7 +425,7 @@ impl JsObject {
425425 let set = if let Some ( setter) = self . try_get ( js_string ! ( "set" ) , context) ? {
426426 // 14.b. If IsCallable(setter) is false and setter is not undefined, throw a TypeError exception.
427427 // todo: extract IsCallable to be callable from Value
428- if !setter. is_undefined ( ) && setter. as_object ( ) . map_or ( true , |o| !o. is_callable ( ) ) {
428+ if !setter. is_undefined ( ) && setter. as_object ( ) . is_none_or ( |o| !o. is_callable ( ) ) {
429429 return Err ( JsNativeError :: typ ( )
430430 . with_message ( "Property descriptor setter must be callable" )
431431 . into ( ) ) ;
@@ -748,6 +748,10 @@ impl<T: NativeObject + ?Sized> JsObject<T> {
748748 /// [spec]: https://tc39.es/ecma262/#sec-iscallable
749749 #[ inline]
750750 #[ must_use]
751+ #[ expect(
752+ unpredictable_function_pointer_comparisons,
753+ reason = "can only use `ptr::fn_addr_eq` on rustc 1.85"
754+ ) ]
751755 pub fn is_callable ( & self ) -> bool {
752756 self . inner . vtable . __call__ != ORDINARY_INTERNAL_METHODS . __call__
753757 }
@@ -760,6 +764,10 @@ impl<T: NativeObject + ?Sized> JsObject<T> {
760764 /// [spec]: https://tc39.es/ecma262/#sec-isconstructor
761765 #[ inline]
762766 #[ must_use]
767+ #[ expect(
768+ unpredictable_function_pointer_comparisons,
769+ reason = "can only use `ptr::fn_addr_eq` on rustc 1.85"
770+ ) ]
763771 pub fn is_constructor ( & self ) -> bool {
764772 self . inner . vtable . __construct__ != ORDINARY_INTERNAL_METHODS . __construct__
765773 }
0 commit comments