mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 00:01:34 +11:00
Don't use ok_or_else for a copy value (#778)
Needed to fix today's clippy linting error - [x] no changelog update needed
This commit is contained in:
commit
bfe3a02a50
|
@ -27,7 +27,7 @@ pub fn load_dwarf(file_content: &[u8]) -> Result<GimliDwarf, LoadDwarfError> {
|
|||
let last_non_zero_byte = file_content
|
||||
.iter()
|
||||
.rposition(|&b| b != 0)
|
||||
.ok_or_else(|| LoadDwarfError::GbaFileEmpty)?;
|
||||
.ok_or(LoadDwarfError::GbaFileEmpty)?;
|
||||
|
||||
let file_content = &file_content[..last_non_zero_byte + 1];
|
||||
|
||||
|
|
Loading…
Reference in a new issue