forked from foundry-rs/foundry
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from Troublor/forge_clone
Forge clone
- Loading branch information
Showing
156 changed files
with
1,384 additions
and
963 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -577,7 +577,7 @@ impl Future for PeriodicStateDumper { | |
fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> { | ||
let this = self.get_mut(); | ||
if this.dump_state.is_none() { | ||
return Poll::Pending | ||
return Poll::Pending; | ||
} | ||
|
||
loop { | ||
|
@@ -588,7 +588,7 @@ impl Future for PeriodicStateDumper { | |
} | ||
Poll::Pending => { | ||
this.in_progress_dump = Some(flush); | ||
return Poll::Pending | ||
return Poll::Pending; | ||
} | ||
} | ||
} | ||
|
@@ -598,7 +598,7 @@ impl Future for PeriodicStateDumper { | |
let path = this.dump_state.clone().expect("exists; see above"); | ||
this.in_progress_dump = Some(Box::pin(PeriodicStateDumper::dump_state(api, path))); | ||
} else { | ||
break | ||
break; | ||
} | ||
} | ||
|
||
|
@@ -628,7 +628,7 @@ impl StateFile { | |
} | ||
let mut state = Self { path, state: None }; | ||
if !state.path.exists() { | ||
return Ok(state) | ||
return Ok(state); | ||
} | ||
|
||
state.state = Some(SerializableState::load(&state.path).map_err(|err| err.to_string())?); | ||
|
@@ -663,14 +663,14 @@ impl FromStr for ForkUrl { | |
fn from_str(s: &str) -> Result<Self, Self::Err> { | ||
if let Some((url, block)) = s.rsplit_once('@') { | ||
if block == "latest" { | ||
return Ok(ForkUrl { url: url.to_string(), block: None }) | ||
return Ok(ForkUrl { url: url.to_string(), block: None }); | ||
} | ||
// this will prevent false positives for auths `user:[email protected]` | ||
if !block.is_empty() && !block.contains(':') && !block.contains('.') { | ||
let block: u64 = block | ||
.parse() | ||
.map_err(|_| format!("Failed to parse block number: `{block}`"))?; | ||
return Ok(ForkUrl { url: url.to_string(), block: Some(block) }) | ||
return Ok(ForkUrl { url: url.to_string(), block: Some(block) }); | ||
} | ||
} | ||
Ok(ForkUrl { url: s.to_string(), block: None }) | ||
|
Oops, something went wrong.