Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Harthann committed Nov 16, 2023
1 parent 67d682f commit 11478ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion srcs/disk/ide.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ impl DiskIO for IDEDisk {
}

fn sector_size(&self) -> usize {
self.device.sector_size() as usize
self.device.sector_size() as usize
}
}
11 changes: 2 additions & 9 deletions srcs/pci/ide/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,18 +202,11 @@ impl IDEDevice {

pub fn sector_size(&self) -> u32 {
match self.r#type {
x if x == IDEType::ATA as u16 => {
ata::SECTOR_SIZE
},
x if x == IDEType::ATAPI as u16 => {
atapi::SECTOR_SIZE
},
x if x == IDEType::ATA as u16 => ata::SECTOR_SIZE,
x if x == IDEType::ATAPI as u16 => atapi::SECTOR_SIZE,
_ => {
panic!("Unrecognized disk.")
}
}
}



}

0 comments on commit 11478ba

Please sign in to comment.