Skip to content

Commit

Permalink
clippy suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
niamster committed Jun 14, 2017
1 parent 7bb58d5 commit f252993
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/line_range.rs
Expand Up @@ -78,7 +78,7 @@ pub fn prepare_ranges(level: LogLevel, lranges: &[(u32, u32)]) -> Result<Vec<Lin
.map(|&(from, to)| LineRangeSpec::new(level, from, to))
.partition(Result::is_ok);
if !fails.is_empty() {
let err = fails.first().unwrap().clone();
let err = *fails.first().unwrap();
return Err(err.unwrap_err());
}

Expand All @@ -90,7 +90,7 @@ pub fn prepare_ranges(level: LogLevel, lranges: &[(u32, u32)]) -> Result<Vec<Lin
if lranges.len() == 1 {
let bof: u32 = LineRangeBound::BOF.into();
let eof: u32 = LineRangeBound::EOF.into();
let first = lranges.first().unwrap().clone();
let first = *lranges.first().unwrap();
if first.from == bof && first.to == eof {
lranges.clear();
}
Expand Down

0 comments on commit f252993

Please sign in to comment.