pub fn check_same_with<'f, T: Facet<'f>>(
left: &T,
right: &T,
options: SameOptions,
) -> SamenessExpand description
Check if two Facet values are structurally the same, with custom options.
ยงExample
use facet_assert::{check_same_with, SameOptions, Sameness};
let a = 1.0000001_f64;
let b = 1.0000002_f64;
// With tolerance, these are considered the same
let options = SameOptions::new().float_tolerance(1e-6);
assert!(matches!(check_same_with(&a, &b, options), Sameness::Same));