Skip to content
This repository was archived by the owner on Sep 28, 2022. It is now read-only.

Commit b235cb6

Browse files
committed
[meta] fix clippy issues
1 parent c489ddd commit b235cb6

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

guppy/src/graph/graph_impl.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1481,9 +1481,8 @@ impl<'g> ExternalSource<'g> {
14811481
} else if let Some(rest) = source.strip_prefix(Self::GIT_PLUS) {
14821482
// A Git source.
14831483
// Look for a trailing #, which indicates the resolved revision.
1484-
let mut split_rev = rest.rsplitn(2, '#');
1485-
let resolved = split_rev.next()?;
1486-
let rest = split_rev.next()?;
1484+
let (rest, resolved) = rest.rsplit_once('#')?;
1485+
14871486
let (repository, req) = if let Some(idx) = rest.find(Self::BRANCH_EQ) {
14881487
(
14891488
&rest[..idx],

target-spec/src/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ impl error::Error for ExpressionParseError {
7777
/// An error returned while parsing a single target.
7878
///
7979
/// This is caused by a triple not being understood by either `cfg-expr` or `target-lexicon`.
80-
#[derive(Debug, PartialEq)]
80+
#[derive(Debug, PartialEq, Eq)]
8181
pub struct TripleParseError {
8282
triple_str: Cow<'static, str>,
8383
lexicon_err: cfg_expr::target_lexicon::ParseError,

tools/cargo-hakari/src/output.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ fn stderr_supports_color() -> bool {
121121
}
122122
}
123123

124-
#[derive(Copy, Clone, Debug, PartialEq)]
124+
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
125125
#[must_use]
126126
pub enum Color {
127127
Auto,

0 commit comments

Comments
 (0)