-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
handle error and include some traits #4
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -11,7 +11,7 @@ use ethers::types::H160; | |||||||||||||
use super::*; | ||||||||||||||
use crate::bindings::{token::ArbiterToken, uniswap_v3_factory::UniswapV3Factory}; | ||||||||||||||
|
||||||||||||||
#[derive(Debug, Deserialize, Serialize)] | ||||||||||||||
#[derive(Debug, Deserialize, Serialize, Clone)] | ||||||||||||||
pub struct DeploymentData { | ||||||||||||||
token_0: H160, | ||||||||||||||
token_1: H160, | ||||||||||||||
|
@@ -30,7 +30,7 @@ impl DeploymentData { | |||||||||||||
} | ||||||||||||||
} | ||||||||||||||
|
||||||||||||||
#[derive(Debug, Deserialize, Serialize)] | ||||||||||||||
#[derive(Debug, Deserialize, Serialize, Clone)] | ||||||||||||||
pub struct Deployer; | ||||||||||||||
|
||||||||||||||
#[async_trait::async_trait] | ||||||||||||||
|
@@ -69,7 +69,9 @@ impl Behavior<()> for Deployer { | |||||||||||||
pool, | ||||||||||||||
); | ||||||||||||||
|
||||||||||||||
messager.send(To::All, serde_json::to_string(&deployment_data)?).await; | ||||||||||||||
let _ = messager | ||||||||||||||
.send(To::All, serde_json::to_string(&deployment_data)?) | ||||||||||||||
.await; | ||||||||||||||
Comment on lines
+72
to
+74
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Usually prefer to use the The linter gets mad when you do |
||||||||||||||
|
||||||||||||||
Ok(None) | ||||||||||||||
} | ||||||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ use serde::{Deserialize, Serialize}; | |
|
||
pub mod deployer; | ||
|
||
pub use deployer::Deployer; | ||
pub use deployer::Deployer; |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's not change any bindings files as they are quite finnicky and autogenned There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Autoparallel yep, will close this |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,5 +12,5 @@ async fn main() { | |
let deployer = Agent::builder("deployer").with_behavior(Deployer); | ||
|
||
world.add_agent(deployer); | ||
world.run().await; | ||
let _ = world.run().await; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For clippy? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
yeah There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this a crate? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A very good linter: https://doc.rust-lang.org/stable/clippy/usage.html |
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could just
?
here to save LOC as it is effectively the same thingThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, prefer using this ? tbh, mistake on my path