Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/artifacts/solc/src/ast/lowfidelity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ pub struct Node {

/// Child nodes for some node types.
#[serde(default)]
pub nodes: Vec<Node>,
pub nodes: Vec<Self>,

/// Body node for some node types.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub body: Option<Box<Node>>,
pub body: Option<Box<Self>>,

/// Node attributes that were not deserialized.
#[serde(flatten)]
Expand Down
2 changes: 1 addition & 1 deletion crates/artifacts/solc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1447,7 +1447,7 @@ pub struct Item {
#[serde(rename = "type")]
pub put_type: String,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub components: Vec<Item>,
pub components: Vec<Self>,
/// Indexed flag. for solidity events
#[serde(default, skip_serializing_if = "Option::is_none")]
pub indexed: Option<bool>,
Expand Down
3 changes: 1 addition & 2 deletions crates/compilers/src/compilers/solc/compiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -618,8 +618,7 @@ fn version_from_output(output: Output) -> Result<Version> {
let stdout = String::from_utf8_lossy(&output.stdout);
let version = stdout
.lines()
.filter(|l| !l.trim().is_empty())
.next_back()
.rfind(|l| !l.trim().is_empty())
.ok_or_else(|| SolcError::msg("Version not found in Solc output"))?;
// NOTE: semver doesn't like `+` in g++ in build metadata which is invalid semver
Ok(Version::from_str(&version.trim_start_matches("Version: ").replace(".g++", ".gcc"))?)
Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pub enum SolcError {
--> {1}\n\t\
{2}"
)]
FailedResolveImport(Box<SolcError>, PathBuf, PathBuf),
FailedResolveImport(Box<Self>, PathBuf, PathBuf),
#[cfg(feature = "svm-solc")]
#[error(transparent)]
SvmError(#[from] svm::SvmError),
Expand Down
Loading