Skip to content

Commit

Permalink
chore(crates): address lint errs when rust is at 1.77+
Browse files Browse the repository at this point in the history
Signed-off-by: Vaughn Dice <vaughn.dice@fermyon.com>
  • Loading branch information
vdice committed Apr 25, 2024
1 parent 33afee8 commit 6696a0d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crates/plugins/src/badger/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ impl BadgerRecordManager {
let new = BadgerRecord {
name: name.to_owned(),
badgered_from: from.clone(),
badgered_to: to.iter().map(|v| <semver::Version>::clone(v)).collect(),
badgered_to: to.iter().cloned().map(<semver::Version>::clone).collect(),
when: chrono::Utc::now(),
};

Expand Down
12 changes: 9 additions & 3 deletions crates/templates/src/template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -646,19 +646,25 @@ fn validate_v1_manifest(raw: &RawTemplateManifestV1) -> anyhow::Result<()> {
mod test {
use super::*;

struct TempFile(tempfile::TempDir, PathBuf);
struct TempFile {
_temp_dir: tempfile::TempDir,
path: PathBuf,
}

impl TempFile {
fn path(&self) -> PathBuf {
self.1.clone()
self.path.clone()
}
}

fn make_temp_manifest(content: &str) -> TempFile {
let temp_dir = tempfile::tempdir().unwrap();
let temp_file = temp_dir.path().join("spin.toml");
std::fs::write(&temp_file, content).unwrap();
TempFile(temp_dir, temp_file)
TempFile {
_temp_dir: temp_dir,
path: temp_file,
}
}

#[test]
Expand Down

0 comments on commit 6696a0d

Please sign in to comment.