Skip to content
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

Add new espace async rpc traits #2920

Merged
merged 9 commits into from
Oct 16, 2024
Merged

Conversation

Pana
Copy link
Member

@Pana Pana commented Sep 23, 2024

Also include net and web3 trait impls

This change is Reviewable

@Pana Pana changed the title Add espace rpc traits and net impl Add new espace async rpc traits Sep 23, 2024
Copy link
Contributor

@ChenxingLi ChenxingLi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 44 of 46 files at r1, all commit messages.
Reviewable status: 44 of 46 files reviewed, 1 unresolved discussion (waiting on @Pana)


crates/rpc/rpc/src/web3.rs line 15 at r1 (raw file):

}

#[async_trait]

Since rust 1.75, the async trait is supported natively.

Copy link
Member Author

@Pana Pana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 44 of 46 files reviewed, 1 unresolved discussion (waiting on @ChenxingLi)


crates/rpc/rpc/src/web3.rs line 15 at r1 (raw file):

Previously, ChenxingLi (Chenxing Li) wrote…

Since rust 1.75, the async trait is supported natively.

The stabilization of async functions in traits in Rust 1.75 did not include support for using traits containing async functions as dyn Trait
If not use #[async_trait] compile will fail with error: ^ lifetimes do not match method in trait

Copy link
Contributor

@ChenxingLi ChenxingLi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 of 46 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @Pana)

@Pana Pana merged commit 8513c83 into Conflux-Chain:master Oct 16, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants