You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
warning: very complex type used.Consider factoring parts into `type` definitions
--> bb8/src/api.rs:261:14
|
261 | async fn connect(&self) -> Result<Self::Connection,Self::Error>;
| ^^^^^^^
|
= note: `#[warn(clippy::type_complexity)]` on by default
= help:for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
/// A trait which provides connection-specific functionality.#[async_trait]pubtraitManageConnection:Sized + Send + Sync + 'static {/// The connection type this manager deals with.typeConnection:Send + 'static;/// The error type returned by `Connection`s.typeError: fmt::Debug + Send + 'static;/// Attempts to create a new connection.asyncfnconnect(&self) -> Result<Self::Connection,Self::Error>;/// Determines if the connection is still connected to the database.asyncfnis_valid(&self,conn:&mutPooledConnection<'_,Self>) -> Result<(),Self::Error>;/// Synchronously determine if the connection is no longer usable, if possible.fnhas_broken(&self,conn:&mutSelf::Connection) -> bool;}
Should I suppress this on my side, or is that something the async-trait macro could/should do?
The text was updated successfully, but these errors were encountered:
The future coming out of async-trait is something like ::core::pin::Pin<Box<dyn ::core::future::Future<Output = Result<Self::Connection, Self::Error>> + ::core::marker::Send + 'async_trait>> which is indeed complex! Sorry about the breakage. This needs to be fixed in async-trait with a suppression because it isn't really the caller code's "fault".
I'm getting this:
for this trait definition in bb8:
Should I suppress this on my side, or is that something the async-trait macro could/should do?
The text was updated successfully, but these errors were encountered: