Skip to content

Commit 55eadda

Browse files
ollie27BProg
authored andcommitted
overflowing_literals false positive
In a future version of Rust the `overflowing_literals` lint will become deny by default. See rust-lang/rust#55632. When checking for breakage in crates uploaded to crates.io it was discovered that this crate will no longer compile thanks to this lint. The error produced is [here](https://crater-reports.s3.amazonaws.com/pr-55632/try%23dc13be39fae8d4c607889b27de374b52586485a3/gh/BProg.des_chipher_rust/log.txt). This PR should fix the false positive.
1 parent 54f7a3e commit 55eadda

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -448,15 +448,15 @@ fn get_48_bit_keys_from_array_of_28_bit_pairs() {
448448
#[test]
449449
fn permutation_of_64bit_integer_gives_58_bit() {
450450
let message_64bit = 0x123456789abcdef;
451-
let intial_permutation = 0xcc00ccfff0aaf0aa;
451+
let intial_permutation = 0xcc00ccfff0aaf0aa_u64 as i64;
452452
assert_eq!(intial_permutation, initial_permutation_of_64bit_message(message_64bit));
453453
}
454454

455455

456456
#[cfg(test)]
457457
#[test]
458458
fn splitting_key_of_64_bit_into_32_bit_pair() {
459-
let key = 0xcc00ccfff0aaf0aa;
459+
let key = 0xcc00ccfff0aaf0aa_u64 as i64;
460460
let left = 0xcc00ccffi64;
461461
let right = 0xf0aaf0aai64;
462462
assert_eq!((left, right), split_key(key, 64));
@@ -569,6 +569,6 @@ fn final_pair_is_generated() {
569569
fn final_permutation_is_85E813540F0AB405_from_43423234_and_A4CD995() {
570570
let L16 = 0x43423234;
571571
let R16 = 0xA4CD995;
572-
let permutation = 0x85E813540F0AB405;
572+
let permutation = 0x85E813540F0AB405_u64 as i64;
573573
assert_eq!(permutation, last_permutation_with_ip_table((L16, R16)));
574574
}

0 commit comments

Comments
 (0)