quinn-rs / quinn

Async-friendly QUIC implementation in Rust
Apache License 2.0
3.85k stars 394 forks source link

crates.io v0.10.2 fails to compile, Connection(ConnectionRef) doesn't impl Default, while git 0.10.2 succeeds #1735

Closed MaxCWhitehead closed 10 months ago

MaxCWhitehead commented 10 months ago

Hi, I found when using quinn 0.10.2 from crates.io, I get this error:

error[E0277]: the trait bound `ConnectionRef: Default` is not satisfied
   --> /Users/max/.cargo/registry/src/index.crates.io-6f17d22bba15001f/quinn-0.10.2/src/connection.rs:265:23
    |
264 | #[derive(Debug, Clone, Default)]
    |                        ------- in this derive macro expansion
265 | pub struct Connection(ConnectionRef);
    |                       ^^^^^^^^^^^^^ the trait `Default` is not implemented for `ConnectionRef`

However if I use git tag 0.10.2, it compiles as the Default derive macro is not present.

Is there a mismatch between git and crates.io release? Not totally sure what is going on here. There are no other versions of quinn in dependency tree.

I am testing with these: quinn = { version = "0.10.2", default-features = false, features = ["native-certs", "tls-rustls"] } quinn = { git = "https://github.com/quinn-rs/quinn.git", rev = "0.10.2", default-features = false, features = ["native-certs", "tls-rustls"] }

MaxCWhitehead commented 10 months ago

I found our CI is building this correctly, it turns out my cargo cache was screwed up, I deleted this and builds fine. Sorry for confusion here.