zbus-old icon indicating copy to clipboard operation
zbus-old copied to clipboard

Large futures cause clippy to be triggered on programs which use `zbus::Connection::session()`

Open zeenix opened this issue 2 years ago • 1 comments
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.

zeenix avatar Apr 20 '23 21:04 zeenix

Thanks for filing this. I'm away at the moment. I'll try to look into it soon.

zeenix avatar Apr 21 '23 23:04 zeenix