Skip to content

Commit

Permalink
Remove more code duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanUkhov committed Apr 28, 2024
1 parent e376a38 commit 0c0dbe8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,8 @@ pub fn compute<T: AsRef<[u8]>>(data: T) -> Digest {
mut cursor,
mut length,
} = Context::new();
let data = data.as_ref();
consume(&mut state, &mut buffer, &mut cursor, &mut length, data);
finalize(&mut state, &mut buffer, cursor, data.len() as u64)
consume(&mut state, &mut buffer, &mut cursor, &mut length, data.as_ref());
finalize(&mut state, &mut buffer, cursor, length)
}

#[inline(always)]
Expand Down

0 comments on commit 0c0dbe8

Please sign in to comment.