Skip to content

Commit

Permalink
rc5: minor code tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
newpavlov committed Nov 27, 2023
1 parent 1967139 commit 985d87c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 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 985d87c

Please sign in to comment.