Skip to content

Commit

Permalink
Fix new clippy failures
Browse files Browse the repository at this point in the history
  • Loading branch information
mystor committed Dec 20, 2024
1 parent 85b7058 commit cbe0b8e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions src/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ impl<'de> Deserialize<'de> for VetVersion {
{
struct VersionVisitor;

impl<'de> Visitor<'de> for VersionVisitor {
impl Visitor<'_> for VersionVisitor {
type Value = VetVersion;

fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result {
Expand Down Expand Up @@ -441,7 +441,7 @@ impl<'de> Deserialize<'de> for Delta {
{
struct DeltaVisitor;

impl<'de> Visitor<'de> for DeltaVisitor {
impl Visitor<'_> for DeltaVisitor {
type Value = Delta;

fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result {
Expand Down Expand Up @@ -972,7 +972,7 @@ impl<'de> Deserialize<'de> for StoreVersion {
{
struct VersionVisitor;

impl<'de> Visitor<'de> for VersionVisitor {
impl Visitor<'_> for VersionVisitor {
type Value = StoreVersion;

fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result {
Expand Down
2 changes: 1 addition & 1 deletion src/git_tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ impl<'a> Pager<'a> {
}
}

impl<'a> io::Write for Pager<'a> {
impl io::Write for Pager<'_> {
fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
match &mut self.child {
Some(child) => child.stdin.as_mut().unwrap().write(buf),
Expand Down
2 changes: 1 addition & 1 deletion src/out.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub trait Out: Send + Sync + 'static {
/// Write to the output
fn write_fmt(&self, args: fmt::Arguments<'_>) {
struct AsWrite<'a, T: ?Sized>(&'a T);
impl<'a, T: ?Sized + Out> io::Write for AsWrite<'a, T> {
impl<T: ?Sized + Out> io::Write for AsWrite<'_, T> {
fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
Out::write(self.0, buf)
}
Expand Down
10 changes: 5 additions & 5 deletions src/resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1543,18 +1543,18 @@ fn search_for_path(
}
}
}
impl<'a> PartialEq for Node<'a> {
impl PartialEq for Node<'_> {
fn eq(&self, other: &Self) -> bool {
self.key() == other.key()
}
}
impl<'a> Eq for Node<'a> {}
impl<'a> PartialOrd for Node<'a> {
impl Eq for Node<'_> {}
impl PartialOrd for Node<'_> {
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
Some(self.cmp(other))
}
}
impl<'a> Ord for Node<'a> {
impl Ord for Node<'_> {
fn cmp(&self, other: &Self) -> std::cmp::Ordering {
self.key().cmp(&other.key())
}
Expand Down Expand Up @@ -1665,7 +1665,7 @@ fn search_for_path(
Err(visited.into_iter().map(|v| v.cloned()).collect())
}

impl<'a> ResolveReport<'a> {
impl ResolveReport<'_> {
pub fn has_errors(&self) -> bool {
// Just check the conclusion
!matches!(self.conclusion, Conclusion::Success(_))
Expand Down
4 changes: 2 additions & 2 deletions tests/snapshots/test_cli__test-project-suggest.snap
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ recommended audits for safe-to-deploy (or audited):
cargo vet inspect winreg 0.10.1 gentoo90 reqwest 3920 lines
cargo vet inspect core-foundation 0.9.3 jrmuizel security-framework 3953 lines
cargo vet inspect tracing-attributes 0.1.20 hawkw tracing 3957 lines
NOTE: this project trusts Eliza Weisman (hawkw) - consider cargo vet trust tracing-attributes or cargo vet trust --all hawkw
NOTE: this project trusts Eliza Weisman (hawkw) - consider cargo vet trust tracing-attributes hawkw
cargo vet inspect ipnet 2.4.0 krisprice reqwest 3973 lines
cargo vet inspect futures-channel 0.3.21 taiki-e hyper 3992 lines
cargo vet inspect tempfile 3.3.0 Stebalien native-tls 4059 lines
Expand All @@ -72,7 +72,7 @@ recommended audits for safe-to-deploy (or audited):
cargo vet inspect socket2 0.4.4 Thomasdezeeuw hyper and tokio 6011 lines
cargo vet inspect pin-project-lite 0.2.8 taiki-e hyper, tokio, reqwest, and 4 others 6100 lines
cargo vet inspect tracing-core 0.1.25 hawkw tracing 6156 lines
NOTE: this project trusts Eliza Weisman (hawkw) - consider cargo vet trust tracing-core or cargo vet trust --all hawkw
NOTE: this project trusts Eliza Weisman (hawkw) - consider cargo vet trust tracing-core hawkw
cargo vet inspect cc 1.0.73 alexcrichton openssl-sys 6554 lines
cargo vet inspect httparse 1.7.0 seanmonstar hyper 7258 lines
cargo vet inspect memchr 2.4.1 BurntSushi tokio and os_str_bytes 8712 lines
Expand Down

0 comments on commit cbe0b8e

Please sign in to comment.