zbus-old
zbus-old copied to clipboard
Large futures cause clippy to be triggered on programs which use `zbus::Connection::session()`
trafficstars
In GitLab by @TTWNO on Apr 20, 2023, 23:48
On beta and nightly, the new clippy lint large futures gets triggered when attempting to use the session connection:
error: large future with a size of 21448 bytes
--> src/accessibility_connection.rs:291:16
|
291 | let session = zbus::Connection::session().await?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider `Box::pin` on it: `Box::pin(zbus::Connection::session())`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_futures
I'm not sure if this is really a problem worth fixing or not; I don't know how likely a stack overflow really is, but I thought it was worth mentioning.
You will need to use +nightly or +beta to see the lint.
Thanks for filing this. I'm away at the moment. I'll try to look into it soon.