Skip to content

Commit

Permalink
CI: fix rust-nightly static checks
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Porter <[email protected]>
  • Loading branch information
portersrc authored and fitzthum committed Feb 15, 2024
1 parent 2fc4924 commit aa6cf28
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion image-rs/src/pull.rs
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ mod tests {

for image_url in nydus_images.iter() {
let tempdir = tempfile::tempdir().unwrap();
let image = Reference::try_from((*image_url).clone()).expect("create reference failed");
let image = Reference::try_from(*image_url).expect("create reference failed");
let mut client = PullClient::new(
image,
tempdir.path(),
Expand Down
1 change: 1 addition & 0 deletions image-rs/src/resource/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ lazy_static::lazy_static! {
/// - `SCHEME`: `file` string, to distinguish different uri scheme
/// - `get_resource()`: get resource from the uri
#[async_trait]
#[allow(dead_code)]
trait Protocol: Send + Sync {
async fn get_resource(&mut self, uri: &str) -> Result<Vec<u8>>;
}
Expand Down
6 changes: 3 additions & 3 deletions image-rs/src/signature/image/digest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ impl Digest {
}
}

impl ToString for Digest {
fn to_string(&self) -> String {
format!("{}:{}", self.algorithm, self.value)
impl fmt::Display for Digest {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}:{}", self.algorithm, self.value)
}
}

Expand Down

0 comments on commit aa6cf28

Please sign in to comment.