Function ::std::ops::eq

Overview
fn 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 [EQ] protocol.

Panics

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

Examples

use std::ops::eq;

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