Skip to content

Commit

Permalink
bin.rs: clippy-suggested Err? replacement
Browse files Browse the repository at this point in the history
  • Loading branch information
warner committed Dec 6, 2019
1 parent 172fb75 commit 7ec2962
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/bin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,7 @@ fn main() -> Result<(), Box<dyn Error>> {
}
});
if end < len {
Err(ParseError(format!(
"range {} is too short for len={}",
end, len
)))?
return Err(ParseError(format!("range {} is too short for len={}", end, len)).into());
}

let offsets: u64 = 44.min((1 + end - len) as u64);
Expand Down

0 comments on commit 7ec2962

Please sign in to comment.