History

thanks clippy

Sebastian Thiel committed 4 years ago

Commit 2bc1acc1 parent 0c1c48c1 file · +5 −5Browse files

Unified · Split

git-revision/src/spec.rs+5−5
@@ -54,11 +54,6 @@ pub mod parse { · 53 unmodified lines
5454 use crate::spec::parse::{Delegate, Error};
5555 use bstr::{BStr, ByteSlice};
5656
57− fn next(i: &BStr) -> (u8, &BStr) {
58− let b = i[0];
59− (b, i[1..].as_bstr()).into()
60− }
61−
6257 pub fn revision<'a>(mut input: &'a BStr, delegate: &mut impl Delegate) -> Result<&'a BStr, Error> {
6358 if let Some(rest) = input.strip_prefix(b"@").or_else(|| input.strip_prefix(b"HEAD")) {
6459 delegate.resolve_ref("HEAD".into()).ok_or(Error::Delegate)?;
@@ -94,6 +89,11 @@ pub mod parse { · 29 unmodified lines
9489 .map(|rest| (rest, spec::Kind::MergeBase))
9590 .or_else(|| input.strip_prefix(b"..").map(|rest| (rest, spec::Kind::Range)))
9691 }
92+
93+ fn next(i: &BStr) -> (u8, &BStr) {
94+ let b = i[0];
95+ (b, i[1..].as_bstr())
96+ }
9797 }
9898 }
9999 pub use parse::function::parse;