Skip to content

Commit

Permalink
Fix needless_borrow clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ia0 committed Jun 7, 2021
1 parent af77fa5 commit 2288fea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions bin/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ pub fn encode<R: Read, W: Write>(
base: &Encoding, wrap: usize, mut reader: R, mut writer: W, size: usize,
) -> Result<()> {
let block = if wrap == 0 {
encode_block(&base)
encode_block(base)
} else {
assert_eq!(wrap * base.bit_width() % 8, 0);
wrap * base.bit_width() / 8
};
assert_eq!(block % encode_block(&base), 0);
assert_eq!(block % encode_block(base), 0);
assert!(size >= block);
let mut input = vec![0u8; size];
let mut output = vec![0u8; base.encode_len(size)];
Expand Down
2 changes: 1 addition & 1 deletion lib/macro/internal/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ fn check_present<T>(hash_map: &HashMap<String, T>, key: &str) {
}

fn get_encoding(mut hash_map: &mut HashMap<String, TokenTree>) -> Encoding {
check_present(&hash_map, "symbols");
check_present(hash_map, "symbols");
let spec = Specification {
symbols: get_string(&mut hash_map, "symbols"),
bit_order: get_bit_order(&mut hash_map),
Expand Down

0 comments on commit 2288fea

Please sign in to comment.