witnet / witnet-rust

Open source Rust implementation of the Witnet decentralized oracle protocol, including full node and wallet backend 👁️🦀
https://docs.witnet.io
GNU General Public License v3.0
180 stars 56 forks source link

Upgrade codebase and dependencies to latest Rust (1.76.0) #2431

Closed aesedepece closed 6 months ago

aesedepece commented 6 months ago
   Compiling async-trait v0.1.68
error[E0310]: the parameter type `T` may not live long enough
    --> /home/asdpc/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustc-serialize-0.3.24/src/serialize.rs:1155:5
     |
1155 |     fn decode<D: Decoder>(d: &mut D) -> Result<Cow<'static, T>, D::Error> {
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |     |
     |     the parameter type `T` must be valid for the static lifetime...
     |     ...so that the type `T` will meet its required lifetime bounds...
     |
note: ...that is required by this bound
    --> /home/asdpc/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/borrow.rs:180:30
     |
180  | pub enum Cow<'a, B: ?Sized + 'a>
     |                              ^^
help: consider adding an explicit lifetime bound
     |
1151 | impl<'a, T: ?Sized + 'static> Decodable for Cow<'a, T>
     |                    +++++++++
aesedepece commented 6 months ago

fixed in bb93e1eef6fc1c31c5bbde13f5f4edfa6914b29f