[2016][rust][23.1] Use an array instead of a Vec

profile
Alpha Chen 8 years ago
parent 8438d1c6ba
commit 275e6b5f21

@ -80,11 +80,11 @@ impl Iterator for Assembunny {
}
#[derive(Clone, Debug)]
pub struct Registers(Vec<isize>);
pub struct Registers([isize; 5]);
impl Registers {
pub fn new() -> Self {
Registers(vec![0; 5])
Registers([0; 5])
}
fn index(r: Register) -> usize {

Loading…
Cancel
Save