(&self, o: &Self)
| 245 | |
| 246 | impl PartialEq for HigherOrderFunctionExpr { |
| 247 | fn eq(&self, o: &Self) -> bool { |
| 248 | if std::ptr::eq(self, o) { |
| 249 | // The equality implementation is somewhat expensive, so let's short-circuit when possible. |
| 250 | return true; |
| 251 | } |
| 252 | // `slots` is a deterministic function of `fun` and `args`, so it's |
| 253 | // not part of the comparison. |
| 254 | let Self { |
| 255 | fun, |
| 256 | name, |
| 257 | args, |
| 258 | slots: _, |
| 259 | return_field, |
| 260 | config_options, |
| 261 | } = self; |
| 262 | fun.eq(&o.fun) |
| 263 | && name.eq(&o.name) |
| 264 | && args.eq(&o.args) |
| 265 | && return_field.eq(&o.return_field) |
| 266 | && (Arc::ptr_eq(config_options, &o.config_options) |
| 267 | || sorted_config_entries(config_options) |
| 268 | == sorted_config_entries(&o.config_options)) |
| 269 | } |
| 270 | } |
| 271 | impl Eq for HigherOrderFunctionExpr {} |
| 272 | impl Hash for HigherOrderFunctionExpr { |
nothing calls this directly
no test coverage detected