mirror of
https://github.com/bertptrs/adventofcode.git
synced 2025-12-25 21:00:31 +01:00
Properly use the never type.
This commit is contained in:
@@ -19,12 +19,11 @@ impl common::Solution for Day25 {
|
|||||||
let initial = 0b101010101010 - 362 * 7;
|
let initial = 0b101010101010 - 362 * 7;
|
||||||
println!("Initial value: {}", initial);
|
println!("Initial value: {}", initial);
|
||||||
sender_program(initial);
|
sender_program(initial);
|
||||||
unreachable!();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// This function is an approximation of what the original code is doing.
|
/// This function is an approximation of what the original code is doing.
|
||||||
pub fn sender_program(mut a: i32) {
|
pub fn sender_program(mut a: i32) -> ! {
|
||||||
// Placeholder variables
|
// Placeholder variables
|
||||||
let mut b;
|
let mut b;
|
||||||
let mut d;
|
let mut d;
|
||||||
|
|||||||
Reference in New Issue
Block a user