Skip to content
This repository was archived by the owner on Apr 20, 2026. It is now read-only.

Commit 00040e2

Browse files
authored
chore: remove unused imports (#80)
1 parent 4b9e6e4 commit 00040e2

13 files changed

Lines changed: 26 additions & 34 deletions

File tree

src/artifacts/contract.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use crate::artifacts::{
99
use alloy_json_abi::JsonAbi;
1010
use alloy_primitives::Bytes;
1111
use serde::{Deserialize, Serialize};
12-
use std::{borrow::Cow, collections::BTreeMap, convert::TryFrom};
12+
use std::{borrow::Cow, collections::BTreeMap};
1313

1414
/// Represents a compiled solidity contract
1515
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]

src/artifacts/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1970,7 +1970,6 @@ mod tests {
19701970
use super::*;
19711971
use crate::AggregatedCompilerOutput;
19721972
use alloy_primitives::Address;
1973-
use std::{fs, path::PathBuf};
19741973

19751974
#[test]
19761975
fn can_parse_declaration_error() {

src/artifacts/output_selection.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,6 @@ impl FromStr for EwasmOutputSelection {
555555
#[cfg(test)]
556556
mod tests {
557557
use super::*;
558-
use std::collections::BTreeMap;
559558

560559
#[test]
561560
fn outputselection_serde_works() {

src/compile/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@ impl<T: Into<PathBuf>> From<T> for Solc {
753753
#[cfg(test)]
754754
mod tests {
755755
use super::*;
756-
use crate::{Artifact, CompilerInput};
756+
use crate::Artifact;
757757

758758
#[test]
759759
fn test_version_parse() {

src/compile/output/contracts.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ use semver::Version;
1010
use serde::{Deserialize, Deserializer, Serialize, Serializer};
1111
use std::{
1212
collections::BTreeMap,
13-
iter::FromIterator,
1413
ops::{Deref, DerefMut},
1514
path::Path,
1615
};

src/compile/output/info.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Commonly used identifiers for contracts in the compiled output.
22
3-
use std::{borrow::Cow, convert::TryFrom, fmt, str::FromStr};
3+
use std::{borrow::Cow, fmt, str::FromStr};
44

55
#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)]
66
#[error("{0}")]

src/compile/project.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -681,8 +681,6 @@ mod tests {
681681
use super::*;
682682
use crate::{project_util::TempProject, MinimalCombinedArtifacts};
683683

684-
use std::path::PathBuf;
685-
686684
fn init_tracing() {
687685
let _ = tracing_subscriber::fmt()
688686
.with_env_filter(tracing_subscriber::EnvFilter::from_default_env())

src/flatten.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
use std::{
2-
collections::{HashMap, HashSet},
3-
hash::Hash,
4-
path::{Path, PathBuf},
5-
};
6-
7-
use itertools::Itertools;
8-
91
use crate::{
102
artifacts::{
113
ast::SourceLocation,
@@ -16,6 +8,12 @@ use crate::{
168
error::SolcError,
179
utils, Graph, Project, ProjectCompileOutput, ProjectPathsConfig, Result, Solc,
1810
};
11+
use itertools::Itertools;
12+
use std::{
13+
collections::{HashMap, HashSet},
14+
hash::Hash,
15+
path::{Path, PathBuf},
16+
};
1917

2018
/// Alternative of `SourceLocation` which includes path of the file.
2119
#[derive(Debug, PartialEq, Eq, Hash, Clone)]

src/lib.rs

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,23 @@ extern crate tracing;
1111
pub mod error;
1212

1313
pub mod artifacts;
14-
pub mod sourcemap;
15-
1614
pub use artifacts::{CompilerInput, CompilerOutput, EvmVersion};
17-
use std::collections::{BTreeMap, HashSet};
15+
16+
pub mod sourcemap;
1817

1918
mod artifact_output;
19+
pub use artifact_output::*;
20+
2021
pub mod buildinfo;
22+
2123
pub mod cache;
24+
2225
pub mod flatten;
26+
2327
pub mod hh;
24-
pub use artifact_output::*;
28+
pub use hh::{HardhatArtifact, HardhatArtifacts};
2529

2630
pub mod resolver;
27-
pub use hh::{HardhatArtifact, HardhatArtifacts};
2831
pub use resolver::Graph;
2932

3033
mod compile;
@@ -37,15 +40,16 @@ mod config;
3740
pub use config::{AllowedLibPaths, PathStyle, ProjectPaths, ProjectPathsConfig, SolcConfig};
3841

3942
pub mod remappings;
40-
use crate::artifacts::{Source, SourceFile, StandardJsonCompilerInput};
4143

4244
mod filter;
45+
pub use filter::{FileFilter, TestFileFilter};
46+
4347
pub mod report;
48+
4449
pub mod utils;
45-
pub use filter::{FileFilter, TestFileFilter};
4650

4751
use crate::{
48-
artifacts::Sources,
52+
artifacts::{Source, SourceFile, Sources, StandardJsonCompilerInput},
4953
cache::SolFilesCache,
5054
config::IncludePaths,
5155
error::{SolcError, SolcIoError},
@@ -55,7 +59,10 @@ use artifacts::{contract::Contract, Severity};
5559
use compile::output::contracts::VersionedContracts;
5660
use error::Result;
5761
use semver::Version;
58-
use std::path::{Path, PathBuf};
62+
use std::{
63+
collections::{BTreeMap, HashSet},
64+
path::{Path, PathBuf},
65+
};
5966

6067
/// Utilities for creating, mocking and testing of (temporary) projects
6168
#[cfg(feature = "project-util")]

src/project_util/mock.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ use crate::{
55
SolcError,
66
};
77
use rand::{
8-
self,
98
distributions::{Distribution, Uniform},
109
seq::SliceRandom,
1110
Rng,

0 commit comments

Comments
 (0)