FuelLabs / fuel-core

Rust full node implementation of the Fuel v2 protocol.
Other
57.95k stars 2.79k forks source link

Get rid of async-trait #2220

Closed netrome closed 2 months ago

netrome commented 2 months ago

Since Rust 1.75 async functions in traits are natively supported so we should be able to get rid of most (and hopefully all) usages of async-trait.

Definition of done

We don't use async-trait anymore.

-- OR --

We only use async-trait in a few places where we explicitly need to box our futures.

netrome commented 2 months ago

Unfortunately, opaque return types are not object safe and we are extensively using trait objects, so this is a no-go for now.

Reference: https://doc.rust-lang.org/reference/items/traits.html#object-safety