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 guarded_transmute_vec_* functions #4

Merged
merged 1 commit into from
Oct 4, 2017
Merged

Conversation

Enet4
Copy link
Collaborator

@Enet4 Enet4 commented Oct 4, 2017

These functions convert a Vec<u8> into a Vec<T>, while keeping the same size guards as the other functions, as well as attempting to reuse the allocated buffer. When properly used, they can save some copies.

@nabijaczleweli nabijaczleweli merged commit f821547 into master Oct 4, 2017
@nabijaczleweli
Copy link
Owner

Released in v0.4.0.

@nabijaczleweli nabijaczleweli deleted the transmute_vec branch October 4, 2017 20:35
budziq pushed a commit to budziq/pulls_since that referenced this pull request Oct 6, 2017
Examples:

  $ target\debug\pulls_since -r nabijaczleweli/safe-transmute-rs -s 01.01.2016
  https://api.github.com/repos/nabijaczleweli/safe-transmute-rs/pulls?state=closed
  - @nabijaczleweli [Endian-independent tests ](nabijaczleweli/safe-transmute-rs#7)
  - @Enet4 [Add guarded_transmute_vec_* functions](nabijaczleweli/safe-transmute-rs#4)
  - @Enet4 [Add permissive/pedantic versions of transmute_many](nabijaczleweli/safe-transmute-rs#3)

  $ target\debug\pulls_since -r nabijaczleweli/safe-transmute-rs -s 01.01.2016 -u 05.10.2017
  https://api.github.com/repos/nabijaczleweli/safe-transmute-rs/pulls?state=closed
  - @Enet4 [Add guarded_transmute_vec_* functions](nabijaczleweli/safe-transmute-rs#4)
  - @Enet4 [Add permissive/pedantic versions of transmute_many](nabijaczleweli/safe-transmute-rs#3)

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

Successfully merging this pull request may close these issues.

None yet

2 participants