Skip to content

Commit

Permalink
rc5: minor code tweak (#393)
Browse files Browse the repository at this point in the history
  • Loading branch information
newpavlov committed Nov 27, 2023
1 parent 1967139 commit e76698e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions rc5/src/core/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ where

fn words_from_block(block: &Block<W>) -> (W, W) {
// Block size is 2 * word::BYTES so the unwrap is safe
let a = W::from_le_bytes(block[..W::Bytes::USIZE].try_into().unwrap());
let b = W::from_le_bytes(block[W::Bytes::USIZE..].try_into().unwrap());
let a = W::from_le_bytes(block[..W::Bytes::USIZE].into());
let b = W::from_le_bytes(block[W::Bytes::USIZE..].into());

(a, b)
}
Expand Down

0 comments on commit e76698e

Please sign in to comment.