cargo clippy --fix
This commit is contained in:
parent
f1a5d13830
commit
4e4b92abf2
@ -41,7 +41,7 @@ impl Chip {
|
||||
Self {
|
||||
log: log.clone(),
|
||||
cpu: CPU::new(log),
|
||||
rom: rom,
|
||||
rom,
|
||||
device_tree: dev_tree,
|
||||
}
|
||||
}
|
||||
|
||||
@ -54,14 +54,14 @@ impl fmt::Display for CPU {
|
||||
write!(f, "-")?;
|
||||
}
|
||||
}
|
||||
write!(f, "\n")?;
|
||||
writeln!(f)?;
|
||||
for i in 0..32 {
|
||||
write!(f, " R{:-2}={:02X} ", i, self.registers[i])?;
|
||||
if (i + 1) % 10 == 0 {
|
||||
write!(f, "\n")?;
|
||||
writeln!(f)?;
|
||||
}
|
||||
}
|
||||
write!(f, "\n")
|
||||
writeln!(f)
|
||||
}
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ impl CPU {
|
||||
registers: [0u8; 32],
|
||||
pc: 0, // Reset vector
|
||||
sreg: 0, // Uninitialized as well
|
||||
logger: logger,
|
||||
logger,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -22,9 +22,9 @@ pub struct Device {
|
||||
impl Device {
|
||||
pub fn new(device: Box<dyn DeviceImpl>, start_addr: u32, addr_len: u32) -> Self {
|
||||
Self {
|
||||
start_addr: start_addr,
|
||||
addr_len: addr_len,
|
||||
device: device,
|
||||
start_addr,
|
||||
addr_len,
|
||||
device,
|
||||
}
|
||||
}
|
||||
|
||||
@ -49,7 +49,7 @@ pub struct DeviceTree {
|
||||
impl DeviceTree {
|
||||
pub fn new(log: Logger) -> Self {
|
||||
Self {
|
||||
log: log,
|
||||
log,
|
||||
devices: Vec::new(),
|
||||
}
|
||||
}
|
||||
|
||||
@ -40,7 +40,7 @@ pub struct Oscillator {
|
||||
impl Oscillator {
|
||||
pub fn new(log: Logger) -> Self {
|
||||
Self {
|
||||
log: log,
|
||||
log,
|
||||
reg_values: [0u8; 7],
|
||||
|
||||
ctrl: 0,
|
||||
|
||||
@ -10,7 +10,7 @@ pub struct RAM {
|
||||
impl RAM {
|
||||
pub fn new(log: Logger) -> Self {
|
||||
Self {
|
||||
log: log,
|
||||
log,
|
||||
data: Box::new([0u8; 0x4000]),
|
||||
}
|
||||
}
|
||||
|
||||
@ -34,7 +34,7 @@ pub struct USART {
|
||||
impl USART {
|
||||
pub fn new(log: Logger) -> Self {
|
||||
Self {
|
||||
log: log,
|
||||
log,
|
||||
status: 0,
|
||||
ctrla: 0,
|
||||
ctrlb: 0,
|
||||
|
||||
@ -184,8 +184,8 @@ impl<'a> GDBStub<'a> {
|
||||
|
||||
pub fn new(log: slog::Logger, chip: &'a mut chip::Chip) -> Self {
|
||||
Self {
|
||||
log: log,
|
||||
chip: chip,
|
||||
log,
|
||||
chip,
|
||||
breakpoints: HashSet::new(),
|
||||
watchpoints_read: HashSet::new(),
|
||||
watchpoints_write: HashSet::new(),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user