Skip to content

Commit

Permalink
fix clippy (toolchain 1.78.0)
Browse files Browse the repository at this point in the history
Signed-off-by: Phani Sajja <[email protected]>
  • Loading branch information
sajjaphani committed May 3, 2024
1 parent cd903e2 commit 57c1479
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/check/artifact/package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ impl ArtifactCheck for PackageBeforeCheck {
.iter()
.filter_map(|search_path| {
if let Some(dep_ident) = search_path.package_ident(artifact_context.target) {
if tdep_artifacts.get(&dep_ident).is_some() {
if tdep_artifacts.contains_key(&dep_ident) {
let artifact_ctx = artifact_cache.artifact(&dep_ident).unwrap();
if let Some(artifact_ctx) = &artifact_ctx {
for (elf_path, elf_metadata) in &artifact_ctx.elfs {
Expand Down
12 changes: 4 additions & 8 deletions src/check/artifact/script.rs
Original file line number Diff line number Diff line change
Expand Up @@ -559,20 +559,16 @@ impl ArtifactCheck for ScriptCheck {
used_deps.insert(interpreter_artifact_ctx.id.clone());
if interpreter_artifact_ctx
.elfs
.get(command.as_path())
.is_some()
.contains_key(command.as_path())
|| interpreter_artifact_ctx
.scripts
.get(command.as_path())
.is_some()
.contains_key(command.as_path())
|| interpreter_artifact_ctx
.links
.get(command.as_path())
.is_some()
.contains_key(command.as_path())
|| interpreter_artifact_ctx
.machos
.get(command.as_path())
.is_some()
.contains_key(command.as_path())
{
let mut interpreter_listed = false;
for intermediate in intermediates.iter() {
Expand Down
1 change: 1 addition & 0 deletions src/check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,7 @@ pub(crate) trait SourceCheck {
plan_context: &PlanContext,
source_context: &SourceContext,
) -> Vec<LeveledSourceCheckViolation>;
#[allow(dead_code)]
fn source_context_check_with_artifact(
&self,
plan_config: &PlanContextConfig,
Expand Down
4 changes: 2 additions & 2 deletions src/core/artifact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1185,7 +1185,7 @@ impl ArtifactContext {
};
if let Some(next_artifact_ctx) = link.package_ident(artifact_ctx.target) {
if next_artifact_ctx == artifact_ctx.id
&& artifact_ctx.links.get(&link).is_none()
&& !artifact_ctx.links.contains_key(&link)
{
resolved_path = link.to_path_buf();
current_artifact = None;
Expand Down Expand Up @@ -1262,7 +1262,7 @@ impl ArtifactContext {
};
if let Some(next_artifact_ctx) = link.package_ident(artifact_ctx.target) {
if next_artifact_ctx == artifact_ctx.id
&& artifact_ctx.links.get(&link).is_none()
&& !artifact_ctx.links.contains_key(&link)
{
resolved_path = link.to_path_buf();
intermediate_paths.push(resolved_path.clone());
Expand Down
1 change: 1 addition & 0 deletions src/core/dep_graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ impl Dependency {
}

#[derive(Debug, PartialEq, Eq)]
#[allow(dead_code)]
pub(crate) struct DependencyArtifactUpdated {
latest_dep_artifact: PlanContextLatestArtifact,
latest_plan_artifact: PlanContextLatestArtifact,
Expand Down
1 change: 1 addition & 0 deletions src/store/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ impl AsRef<Path> for InvalidPackageSourceArchiveStorePath {
}

#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone)]
#[allow(dead_code)]
pub(crate) struct PackageSourceLicenseStorePath(PathBuf);

impl AsRef<Path> for PackageSourceLicenseStorePath {
Expand Down

0 comments on commit 57c1479

Please sign in to comment.