Function ::std::ops::partial_eq

Overview
fn partial_eq(lhs, rhs) -> bool

Perform a partial equality check over two values.

This produces the same behavior as the equality operator (==).

For non-builtin types this leans on the behavior of the [PARTIAL_EQ] protocol.

Panics

Panics if we're trying to compare two values which are not comparable.

Examples

use std::ops::partial_eq;

assert!(partial_eq(1.0, 1.0));
assert!(!partial_eq(1.0, 2.0));