Skip to content

Commit

Permalink
fix new clippy issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jmt-lab committed Jul 15, 2024
1 parent 9d35873 commit 64bd3c9
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 24 deletions.
8 changes: 4 additions & 4 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@ skip = [
{ name = "base64" },
# several dependencies are using an old version of bitflags
{ name = "bitflags", version = "=1.3" },
# dependencies are using different versions of event-listener
{ name = "event-listener", version = "=4" },
# dependencies are using different versions of event-listener-strategy
{ name = "event-listener-strategy", version = "=0.4" },
# multiple deps are using an older version of hashbrown
{ name = "hashbrown", version = "=0.12" },
# multiple deps are using an older version of indexmap
Expand All @@ -76,8 +72,12 @@ skip = [
{ name = "heck", version = "=0.4" },
# dependencies are using different versions of http
{ name = "http", version = "=0.2" },
# dependencies are using different versions of http-body
{ name = "http-body", version = "=0.4" },
# kube-client uses an older version of pem
{ name = "pem", version = "=1" },
# dependencies are using different versions of redox_syscall
{ name = "redox_syscall", version = "=0.4" },
# several dependencies are using an old version of serde_yaml
{ name = "serde_yaml", version = "=0.8" },
# dependencies are using different versions of snafu
Expand Down
2 changes: 1 addition & 1 deletion tools/buildsys/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ impl KitBuildArgs {
args.build_arg("VERSION_ID", &self.version_id);
args.build_arg("EXTERNAL_KIT_METADATA", &self.external_kit_metadata);
args.build_arg("VENDOR", &self.vendor);
args.build_arg("LOCAL_KIT_DEPENDENCIES", &self.local_kits.join(" "));
args.build_arg("LOCAL_KIT_DEPENDENCIES", self.local_kits.join(" "));
args
}
}
Expand Down
8 changes: 0 additions & 8 deletions tools/buildsys/src/builder/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,6 @@ pub(crate) enum Error {
#[snafu(display("Failed to create build arguments due to a dependency error: {source}"))]
Graph { source: buildsys::manifest::Error },

#[snafu(display(
"Failed to create build arguments due to an error reading external kit metadata: {source}"
))]
ExternalMetadataRead { source: std::io::Error },

#[snafu(display("Failed to serialize kit metadata: {source}"))]
MetadataSerialize { source: serde_json::Error },

#[snafu(display("Missing environment variable '{}'", var))]
Environment {
var: String,
Expand Down
2 changes: 1 addition & 1 deletion tools/pubsys/src/aws/ssm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ pub(crate) async fn run(args: &Args, ssm_args: &SsmArgs) -> Result<()> {
};

let ssm_client = SsmClient::new(&client_config);
if ssm_clients.get(region).is_none() {
if !ssm_clients.contains_key(region) {
ssm_clients.insert(region.clone(), ssm_client);
}

Expand Down
6 changes: 2 additions & 4 deletions tools/pubsys/src/repo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -482,10 +482,8 @@ pub(crate) async fn run(args: &Args, repo_args: &RepoArgs) -> Result<()> {
.repo
.as_ref()
.and_then(|repo_section| repo_section.get(&repo_args.repo))
.map(|repo| {
info!("Using repo '{}' from Infra.toml", repo_args.repo);
repo
}) {
{
info!("Using repo '{}' from Infra.toml", repo_args.repo);
repo_config
} else {
info!(
Expand Down
5 changes: 0 additions & 5 deletions tools/pubsys/src/repo/fetch_variant/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,11 +261,6 @@ mod error {
#[snafu(display("Target names are not set."))]
MissingTargetNames,

#[snafu(display("Output directory does not exist at '{}'", path.display()))]
MissingOutdir {
path: PathBuf,
},

#[snafu(display("Failed to move target: {}", source))]
MoveTarget {
source: io::Error,
Expand Down
5 changes: 4 additions & 1 deletion twoliter/src/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ impl Project {
/// Recursively search for a file named `Twoliter.toml` starting in `dir`. If it is not found,
/// move up (i.e. `cd ..`) until it is found. Return an error if there is no parent directory.
#[async_recursion]
pub(crate) async fn find_and_load<P: AsRef<Path> + Send>(dir: P) -> Result<Self> {
pub(crate) async fn find_and_load<P>(dir: P) -> Result<Self>
where
P: Send + AsRef<Path>,
{
let dir = dir.as_ref();
trace!("Looking for Twoliter.toml in '{}'", dir.display());
ensure!(
Expand Down

0 comments on commit 64bd3c9

Please sign in to comment.