chore(solc): add display impl for PathsConfig (#708)
This commit is contained in:
parent
8f8a813181
commit
e0ac32a68f
|
@ -11,7 +11,9 @@ use serde::{de::DeserializeOwned, Deserialize, Serialize};
|
||||||
use std::{
|
use std::{
|
||||||
collections::BTreeMap,
|
collections::BTreeMap,
|
||||||
convert::TryFrom,
|
convert::TryFrom,
|
||||||
fmt, fs, io,
|
fmt,
|
||||||
|
fmt::Formatter,
|
||||||
|
fs, io,
|
||||||
path::{Path, PathBuf},
|
path::{Path, PathBuf},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -75,6 +77,24 @@ impl ProjectPathsConfig {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl fmt::Display for ProjectPathsConfig {
|
||||||
|
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
|
||||||
|
writeln!(f, "root: {}", self.root.display())?;
|
||||||
|
writeln!(f, "contracts: {}", self.sources.display())?;
|
||||||
|
writeln!(f, "artifacts: {}", self.artifacts.display())?;
|
||||||
|
writeln!(f, "tests: {}", self.tests.display())?;
|
||||||
|
writeln!(f, "libs:")?;
|
||||||
|
for lib in &self.libraries {
|
||||||
|
writeln!(f, " {}", lib.display())?;
|
||||||
|
}
|
||||||
|
writeln!(f, "remappings:")?;
|
||||||
|
for remapping in &self.remappings {
|
||||||
|
writeln!(f, " {}", remapping)?;
|
||||||
|
}
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Eq, PartialEq)]
|
#[derive(Debug, Clone, Eq, PartialEq)]
|
||||||
pub enum PathStyle {
|
pub enum PathStyle {
|
||||||
HardHat,
|
HardHat,
|
||||||
|
|
Loading…
Reference in New Issue