Skip to content

Commit 3e81970

Browse files
committed
clippy
1 parent 54d4a95 commit 3e81970

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
@@ -403,6 +403,8 @@ pub struct CachedArtifact {
403403
pub build_id: String,
404404
}
405405

406+
pub type CachedArtifacts = BTreeMap<String, BTreeMap<Version, BTreeMap<String, CachedArtifact>>>;
407+
406408
/// A `CacheEntry` in the cache file represents a solidity file
407409
///
408410
/// A solidity file can contain several contracts, for every contract a separate `Artifact` is
@@ -432,7 +434,7 @@ pub struct CacheEntry {
432434
///
433435
/// This map tracks the artifacts by `name -> (Version -> profile -> PathBuf)`.
434436
/// This mimics the default artifacts directory structure
435-
pub artifacts: BTreeMap<String, BTreeMap<Version, BTreeMap<String, CachedArtifact>>>,
437+
pub artifacts: CachedArtifacts,
436438
/// Whether this file was compiled at least once.
437439
///
438440
/// 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)