Method
identical_optimization
(
self,
a: &impl Borrow<PyObject>,
b: &impl Borrow<PyObject>,
)
Source from the content-addressed store, hash-verified
| 1912 | /// appropriate return value exists. |
| 1913 | #[inline] |
| 1914 | pub fn identical_optimization( |
| 1915 | self, |
| 1916 | a: &impl Borrow<PyObject>, |
| 1917 | b: &impl Borrow<PyObject>, |
| 1918 | ) -> Option<bool> { |
| 1919 | self.map_eq(|| a.borrow().is(b.borrow())) |
| 1920 | } |
| 1921 | |
| 1922 | /// Returns `Some(true)` when self is `Eq` and `f()` returns true. Returns `Some(false)` when self |
| 1923 | /// is `Ne` and `f()` returns true. Otherwise returns `None`. |
Tested by
no test coverage detected