Skip to content

Conversation

@thatliuser
Copy link

@thatliuser thatliuser commented Nov 14, 2025

With the current Cargo.toml the following errors show up:

error[E0277]: `std::result::Result<(), std::io::Error>` is not a future
   --> crates/smb-transport/src/tcp/transport.rs:144:14
    |
144 |             .await
    |              ^^^^^ `std::result::Result<(), std::io::Error>` is not a future
    |
    = help: the trait `Future` is not implemented for `std::result::Result<(), std::io::Error>`
    = note: std::result::Result<(), std::io::Error> must be a future or must implement `IntoFuture` to be awaited
    = note: required for `std::result::Result<(), std::io::Error>` to implement `IntoFuture`
help: remove the `.await`
    |
144 -             .await
    |

error[E0282]: type annotations needed
   --> crates/smb-transport/src/tcp/transport.rs:142:9
    |
142 | /         reader
143 | |             .read_exact(out_buf)
144 | |             .await
    | |__________________^ cannot infer type

error[E0277]: `std::result::Result<(), std::io::Error>` is not a future
   --> crates/smb-transport/src/tcp/transport.rs:157:14
    |
157 |             .await
    |              ^^^^^ `std::result::Result<(), std::io::Error>` is not a future
    |
    = help: the trait `Future` is not implemented for `std::result::Result<(), std::io::Error>`
    = note: std::result::Result<(), std::io::Error> must be a future or must implement `IntoFuture` to be awaited
    = note: required for `std::result::Result<(), std::io::Error>` to implement `IntoFuture`
help: remove the `.await`
    |
157 -             .await
    |

error[E0282]: type annotations needed
   --> crates/smb-transport/src/tcp/transport.rs:155:9
    |
155 | /         writer
156 | |             .write_all(message)
157 | |             .await
    | |__________________^ cannot infer type

error[E0277]: `std::result::Result<TcpStream, error::TransportError>` is not a future
   --> crates/smb-transport/src/tcp/transport.rs:165:60
    |
165 |         let socket = self.connect_timeout(&server_address).await?;
    |                                                            ^^^^^ `std::result::Result<TcpStream, error::TransportError>` is not a future
    |
    = help: the trait `Future` is not implemented for `std::result::Result<TcpStream, error::TransportError>`
    = note: std::result::Result<TcpStream, error::TransportError> must be a future or must implement `IntoFuture` to be awaited
    = note: required for `std::result::Result<TcpStream, error::TransportError>` to implement `IntoFuture`
help: remove the `.await`
    |
165 -         let socket = self.connect_timeout(&server_address).await?;
165 +         let socket = self.connect_timeout(&server_address)?;
    |

error[E0308]: mismatched types
   --> crates/smb-transport/src/tcp/transport.rs:184:9
    |
183 |     fn connect(&mut self, server_name: &str, server_address: SocketAddr) -> Result<()> {
    |                                                                             ---------- expected `std::result::Result<(), error::TransportError>` because of return type
184 |         self.do_connect(server_name, server_address)
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Result<(), TransportError>`, found future

error[E0308]: mismatched types
   --> crates/smb-transport/src/tcp/transport.rs:222:9
    |
221 |     fn send_raw(&mut self, buf: &[u8]) -> Result<()> {
    |                                           ---------- expected `std::result::Result<(), error::TransportError>` because of return type
222 |         self.send_raw(buf)
    |         ^^^^^^^^^^^^^^^^^^ expected `Result<(), TransportError>`, found future

error[E0308]: mismatched types
   --> crates/smb-transport/src/tcp/transport.rs:233:9
    |
232 |     fn receive_exact(&mut self, out_buf: &mut [u8]) -> Result<()> {
    |                                                        ---------- expected `std::result::Result<(), error::TransportError>` because of return type
233 |         self.receive_exact(out_buf)
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Result<(), TransportError>`, found future

This is probably the wrong way to fix this (I think the proper way is to propagate the async feature to the smb crate) but this worked for me for the default case where I just ran cargo build in the smb-cli folder.

@coderabbitai
Copy link

coderabbitai bot commented Nov 14, 2025

Walkthrough

The smb dependency in the smb-cli crate's Cargo.toml was simplified by removing explicit default-features = false and features = ["std-fs-impls"] configuration, allowing default dependency settings to be used instead.

Changes

Cohort / File(s) Summary
Dependency simplification
crates/smb-cli/Cargo.toml
Removed explicit default-features = false and features = ["std-fs-impls"] from the smb dependency declaration, relying on default configuration.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Verify that removing explicit feature flags does not alter intended behavior or cause unintended feature combinations to be activated

Poem

🐰 A dependency grows lean and light,
No extra flags to clutter sight,
The rabbit hops with glee so bright—
Simplicity prevails tonight! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title check ⚠️ Warning The title claims to fix a build issue, but the change only simplifies a Cargo.toml dependency spec without addressing the actual compilation errors in tcp/transport.rs described in the PR objectives. Either update the title to accurately reflect the dependency simplification change, or provide implementation changes that actually resolve the stated compilation errors.
✅ Passed checks (2 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant