Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: fix rust-nightly static checks #476

Conversation

portersrc
Copy link
Member

This PR attempts to fix these two rust nightly errors we started seeing:

    Checking image-rs v0.1.0 (/home/porter/wo/confidential-containers/guest-components/image-rs)
error: trait `Protocol` is never used
  --> image-rs/src/resource/mod.rs:33:7
   |
33 | trait Protocol: Send + Sync {
   |       ^^^^^^^^
   |
   = note: `-D dead-code` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(dead_code)]`

error: direct implementation of `ToString`
  --> image-rs/src/signature/image/digest.rs:79:1
   |
79 | / impl ToString for Digest {
80 | |     fn to_string(&self) -> String {
81 | |         format!("{}:{}", self.algorithm, self.value)
82 | |     }
83 | | }
   | |_^
   |
   = help: prefer implementing `Display` instead
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_str
ing_trait_impl
   = note: `-D clippy::to-string-trait-impl` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::to_string_trait_impl)]`

@portersrc portersrc force-pushed the fix-rust-nightly-ci-checks-imagers branch from 2d0dd69 to 7ef6656 Compare February 14, 2024 21:07
Copy link
Member

@fitzthum fitzthum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. The dead code warning is slightly interesting. I don't think that is dead code, but it's being consumed by another crate. I have a vague memory of this being a problem in the past. I'm not against the fix here.

@fitzthum fitzthum merged commit aa6cf28 into confidential-containers:main Feb 15, 2024
6 checks passed
@portersrc portersrc deleted the fix-rust-nightly-ci-checks-imagers branch February 19, 2024 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants