rust-syndication / rss

Library for serializing the RSS web content syndication format
https://crates.io/crates/rss
Apache License 2.0
429 stars 53 forks source link

Failed to build #152

Closed failable closed 1 year ago

failable commented 1 year ago

Failed to build with features atom and serde.

User@macOS:~/Downloads/rss $ cargo build --features atom --features serde --release
   Compiling serde v1.0.171
   Compiling syn v2.0.25
   Compiling serde_derive v1.0.171
   Compiling rss v2.0.4 (/Users/User/Downloads/rss)
error[E0277]: the trait bound `Link: Serialize` is not satisfied
    --> src/extension/atom.rs:23:38
     |
23   | #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
     |                                      ^^^^^^^^^ the trait `Serialize` is not implemented for `Link`
...
35   |     /// Links
     |     --------- required by a bound introduced by this call
     |
     = help: the following other types implement trait `Serialize`:
               &'a T
               &'a mut T
               ()
               (T0, T1)
               (T0, T1, T2)
               (T0, T1, T2, T3)
               (T0, T1, T2, T3, T4)
               (T0, T1, T2, T3, T4, T5)
             and 144 others
     = note: required for `Vec<Link>` to implement `Serialize`
note: required by a bound in `serde::ser::SerializeStruct::serialize_field`
    --> /Users/User/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde-1.0.171/src/ser/mod.rs:1897:12
     |
1897 |         T: Serialize;
     |            ^^^^^^^^^ required by this bound in `SerializeStruct::serialize_field`

error[E0277]: the trait bound `Link: Deserialize<'_>` is not satisfied
    --> src/extension/atom.rs:37:16
     |
37   |     pub links: Vec<Link>,
     |                ^^^^^^^^^ the trait `Deserialize<'_>` is not implemented for `Link`
     |
     = help: the following other types implement trait `Deserialize<'de>`:
               &'a Path
               &'a [u8]
               &'a str
               ()
               (T0, T1)
               (T0, T1, T2)
               (T0, T1, T2, T3)
               (T0, T1, T2, T3, T4)
             and 146 others
     = note: required for `Vec<Link>` to implement `Deserialize<'_>`
note: required by a bound in `next_element`
    --> /Users/User/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde-1.0.171/src/de/mod.rs:1729:12
     |
1729 |         T: Deserialize<'de>,
     |            ^^^^^^^^^^^^^^^^ required by this bound in `SeqAccess::next_element`

error[E0277]: the trait bound `Link: Deserialize<'_>` is not satisfied
    --> src/extension/atom.rs:37:16
     |
37   |     pub links: Vec<Link>,
     |                ^^^^^^^^^ the trait `Deserialize<'_>` is not implemented for `Link`
     |
     = help: the following other types implement trait `Deserialize<'de>`:
               &'a Path
               &'a [u8]
               &'a str
               ()
               (T0, T1)
               (T0, T1, T2)
               (T0, T1, T2, T3)
               (T0, T1, T2, T3, T4)
             and 146 others
     = note: required for `Vec<Link>` to implement `Deserialize<'_>`
note: required by a bound in `next_value`
    --> /Users/User/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde-1.0.171/src/de/mod.rs:1868:12
     |
1868 |         V: Deserialize<'de>,
     |            ^^^^^^^^^^^^^^^^ required by this bound in `MapAccess::next_value`

error[E0277]: the trait bound `Link: Deserialize<'_>` is not satisfied
  --> src/extension/atom.rs:35:5
   |
35 |     /// Links
   |     ^^^^^^^^^ the trait `Deserialize<'_>` is not implemented for `Link`
   |
   = help: the following other types implement trait `Deserialize<'de>`:
             &'a Path
             &'a [u8]
             &'a str
             ()
             (T0, T1)
             (T0, T1, T2)
             (T0, T1, T2, T3)
             (T0, T1, T2, T3, T4)
           and 146 others
   = note: required for `Vec<Link>` to implement `Deserialize<'_>`
note: required by a bound in `serde::__private::de::missing_field`
  --> /Users/User/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde-1.0.171/src/private/de.rs:22:8
   |
22 |     V: Deserialize<'de>,
   |        ^^^^^^^^^^^^^^^^ required by this bound in `missing_field`

For more information about this error, try `rustc --explain E0277`.
error: could not compile `rss` (lib) due to 4 previous errors

System: macOS 13.2.1 (22D68) Version: Current master (2c6db6be0b9c48c7feef65f0585baf63f79cd822)

andy128k commented 1 year ago

serde is not a feature. Right name of the feature is with-serde.