approx icon indicating copy to clipboard operation
approx copied to clipboard

Add impls for Vec

Open 1tgr opened this issue 3 years ago • 1 comments

Delegating to the existing slice impls.

Without these impls we could just compare two vecs as slices, but:

  • It requires the &v[..] or v.as_slice() syntax, on both sides of the comparison
  • The vecs have to outlive the assert (assigned to variables), meaning no one-liners like assert_abs_diff_eq!(foo().as_slice() bar.as_slice())

1tgr avatar May 11 '21 18:05 1tgr