George-Miao / qbit

A Rust library for interacting with qBittorrent's Web API
https://docs.rs/qbit-rs
MIT License
31 stars 12 forks source link

Cargo fails to build v0.4.2 due to E0445 #19

Closed Mojken closed 1 week ago

Mojken commented 3 weeks ago

error[E0445]: private trait `IntoLoginState` in public interface
  --> /home/mojken/.cargo/registry/src/github.com-1ecc6299db9ec823/qbit-rs-0.4.2/src/builder.rs:87:1
   |
17 | trait IntoLoginState {
   | -------------------- `IntoLoginState` declared as private
...
87 | impl<C, U> QbitBuilder<C, reqwest::Client, U>
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait

error[E0445]: private trait `IntoLoginState` in public interface
   --> /home/mojken/.cargo/registry/src/github.com-1ecc6299db9ec823/qbit-rs-0.4.2/src/builder.rs:105:1
    |
17  | trait IntoLoginState {
    | -------------------- `IntoLoginState` declared as private
...
105 | impl<C, U> QbitBuilder<C, (), U>
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait

For more information about this error, try `rustc --explain E0445`.
error: could not compile `qbit-rs` due to 2 previous errors```
George-Miao commented 1 week ago

Can you post your rustc version and what command did you run?

Mojken commented 1 week ago

rustc 1.77.2 (25ef9e3d8 2024-04-09) (built from a source tarball)
cargo 1.77.1
cargo run
George-Miao commented 1 week ago

What's the code you tested on, i.e., what did you run

Mojken commented 1 week ago

I'm failing to reproduce this issue myself now. I remember editing the source code in my registry to make some things public, but I've deleted that and am still not getting the issue. Weird.