diff --git a/src/cpu.rs b/src/cpu.rs index a13286c..6366104 100644 --- a/src/cpu.rs +++ b/src/cpu.rs @@ -29,8 +29,8 @@ impl CPU for ExampleCPU { registers: [0; 4], }; - let len = initial_state.len(); - let ram_len = instance.ram.len(); + let len: usize = initial_state.len(); + let ram_len: usize = instance.ram.len(); if len >= ram_len { instance.ram.copy_from_slice(&initial_state[..ram_len]); diff --git a/src/file.rs b/src/file.rs index 33d7168..68a8759 100644 --- a/src/file.rs +++ b/src/file.rs @@ -17,8 +17,8 @@ pub fn save_binary_u8(file_path: &str, content: Vec) { } pub fn load_binary_u8(file_path: &str) -> Vec { - let mut file = File::open(file_path).unwrap(); - let mut buffer = Vec::new(); + let mut file: File = File::open(file_path).unwrap(); + let mut buffer: Vec = Vec::new(); file.read_to_end(&mut buffer).unwrap(); buffer }