Skip to content

Commit ac98b3e

Browse files
committed
clippy
1 parent d91ceb4 commit ac98b3e

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

crates/compilers/src/artifact_output/mod.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ mod hh;
3232
pub use hh::*;
3333

3434
use crate::{
35-
cache::{CachedArtifact, CompilerCache},
35+
cache::{CachedArtifacts, CompilerCache},
3636
output::{
3737
contracts::VersionedContracts,
3838
sources::{VersionedSourceFile, VersionedSourceFiles},
@@ -1029,10 +1029,7 @@ pub struct OutputContext<'a> {
10291029
/// └── inner
10301030
/// └── a.sol
10311031
/// ```
1032-
pub existing_artifacts: BTreeMap<
1033-
&'a Path,
1034-
&'a BTreeMap<String, BTreeMap<Version, BTreeMap<String, CachedArtifact>>>,
1035-
>,
1032+
pub existing_artifacts: BTreeMap<&'a Path, &'a CachedArtifacts>,
10361033
}
10371034

10381035
// === impl OutputContext

crates/compilers/src/cache.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,8 @@ pub struct CachedArtifact {
397397
pub build_id: String,
398398
}
399399

400+
pub type CachedArtifacts = BTreeMap<String, BTreeMap<Version, BTreeMap<String, CachedArtifact>>>;
401+
400402
/// A `CacheEntry` in the cache file represents a solidity file
401403
///
402404
/// A solidity file can contain several contracts, for every contract a separate `Artifact` is
@@ -426,7 +428,7 @@ pub struct CacheEntry {
426428
///
427429
/// This map tracks the artifacts by `name -> (Version -> profile -> PathBuf)`.
428430
/// This mimics the default artifacts directory structure
429-
pub artifacts: BTreeMap<String, BTreeMap<Version, BTreeMap<String, CachedArtifact>>>,
431+
pub artifacts: CachedArtifacts,
430432
/// Whether this file was compiled at least once.
431433
///
432434
/// If this is true and `artifacts` are empty, it means that given version of the file does

crates/compilers/src/resolver/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,7 @@ impl<L: Language, D: ParsedSource<Language = L>> Graph<D> {
758758
Ok(resulted_nodes)
759759
}
760760

761+
#[allow(clippy::complexity)]
761762
fn resolve_settings<C: Compiler<Language = L>, T: ArtifactOutput>(
762763
&self,
763764
project: &Project<C, T>,

0 commit comments

Comments
 (0)