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 16, 2024
1 parent 9d35873 commit 7446ade
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 30 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
submodules: recursive
- name: Install cargo-dist
run: |
cargo install \
cargo install --locked \
--git "https://github.com/webern/cargo-dist" \
--rev "3dcbe823db0c4068f38db790d996a4af54e68b3e"
- id: create-release
Expand Down Expand Up @@ -97,12 +97,12 @@ jobs:
include:
- dist-args: "--artifacts=local --target=x86_64-unknown-linux-musl"
install-dist: |
cargo install \
cargo install --locked \
--git "https://github.com/webern/cargo-dist" \
--rev "3dcbe823db0c4068f38db790d996a4af54e68b3e"
- dist-args: "--artifacts=local --target=aarch64-unknown-linux-musl"
install-dist: |
cargo install \
cargo install --locked \
--git "https://github.com/webern/cargo-dist" \
--rev "3dcbe823db0c4068f38db790d996a4af54e68b3e"
runs-on:
Expand All @@ -119,7 +119,7 @@ jobs:
- name: Install Cross
# Pin cargo cross to a version that we know is working for us.
run: |
cargo install cross --git https://github.com/cross-rs/cross/ --rev d6511b7b
cargo install cross --git https://github.com/cross-rs/cross/ --rev d6511b7b --locked
- name: Run cargo-dist
# This logic is a bit janky because it's trying to be a polyglot between
# powershell and bash since this will run on windows, macos, and linux!
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ jobs:
labels: bottlerocket_ubuntu-latest_16-core
steps:
- uses: actions/checkout@v3
- run: cargo install cargo-deny
- run: cargo install cargo-make
- run: cargo install cargo-deny --locked
- run: cargo install cargo-make --locked
- run: make build
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 7446ade

Please sign in to comment.