Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add impls for Vec #69

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add impls for Vec #69

wants to merge 1 commit into from

Conversation

1tgr
Copy link

@1tgr 1tgr commented May 11, 2021

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())

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant