mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 08:11:33 +11:00
Don't use ok_or_else for a copy value
This commit is contained in:
parent
93dabdb8ca
commit
b7250f45e5
|
@ -27,7 +27,7 @@ pub fn load_dwarf(file_content: &[u8]) -> Result<GimliDwarf, LoadDwarfError> {
|
||||||
let last_non_zero_byte = file_content
|
let last_non_zero_byte = file_content
|
||||||
.iter()
|
.iter()
|
||||||
.rposition(|&b| b != 0)
|
.rposition(|&b| b != 0)
|
||||||
.ok_or_else(|| LoadDwarfError::GbaFileEmpty)?;
|
.ok_or(LoadDwarfError::GbaFileEmpty)?;
|
||||||
|
|
||||||
let file_content = &file_content[..last_non_zero_byte + 1];
|
let file_content = &file_content[..last_non_zero_byte + 1];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue