bikeshedder / deadpool

Dead simple pool implementation for rust with async-await
Apache License 2.0
1.08k stars 137 forks source link

Fix serde not in scope error. #355

Closed brocaar closed 2 months ago

brocaar commented 2 months ago

As serde is an optional dependency, the #[serde(default)] must be behind a cfg_attr to make sure it is only applied in case the serde feature is enabled.

brocaar commented 2 months ago

Example error:

    Checking deadpool-redis v0.17.1
error: cannot find attribute `serde` in this scope
  --> /home/brocaar/.cargo/registry/src/index.crates.io-6f17d22bba15001f/deadpool-redis-0.17.1/src/cluster/config.rs:62:7
   |
62 |     #[serde(default)]
   |       ^^^^^

error: could not compile `deadpool-redis` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
bikeshedder commented 2 months ago

Whopsies! Thank you for the fix! :+1:

bikeshedder commented 2 months ago

I just released deadpool-redis 0.17.2 at crates.io which includes this fix: