Skip to content

Commit

Permalink
thanks clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed May 25, 2022
1 parent 03fc923 commit 0f467ea
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions git-revision/src/spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ pub mod parse {
use crate::spec::parse::{Delegate, Error};
use bstr::{BStr, ByteSlice};

fn next(i: &BStr) -> (u8, &BStr) {
let b = i[0];
(b, i[1..].as_bstr()).into()
}

pub fn revision<'a>(mut input: &'a BStr, delegate: &mut impl Delegate) -> Result<&'a BStr, Error> {
if let Some(rest) = input.strip_prefix(b"@").or_else(|| input.strip_prefix(b"HEAD")) {
delegate.resolve_ref("HEAD".into()).ok_or(Error::Delegate)?;
Expand Down Expand Up @@ -94,6 +89,11 @@ pub mod parse {
.map(|rest| (rest, spec::Kind::MergeBase))
.or_else(|| input.strip_prefix(b"..").map(|rest| (rest, spec::Kind::Range)))
}

fn next(i: &BStr) -> (u8, &BStr) {
let b = i[0];
(b, i[1..].as_bstr())
}
}
}
pub use parse::function::parse;

0 comments on commit 0f467ea

Please sign in to comment.