git: 2e82ac54849c - main - net/rabbiteer: Fix build with rust 1.76.0

From: Mikael Urankar <mikael_at_FreeBSD.org>
Date: Mon, 19 Feb 2024 11:59:49 UTC
The branch main has been updated by mikael:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2e82ac54849cbebff77b81da8ede0bb96cfeba46

commit 2e82ac54849cbebff77b81da8ede0bb96cfeba46
Author:     Mikael Urankar <mikael@FreeBSD.org>
AuthorDate: 2024-02-10 12:45:11 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2024-02-19 11:59:02 +0000

    net/rabbiteer: Fix build with rust 1.76.0
    
    Import upstream patch [1] to fix the following error:
    
    error[E0310]: the parameter type `T` may not live long enough
        --> /wrkdirs/usr/ports/net/rabbiteer/work/rabbiteer-rs-c881238/cargo-crates/rustc-serialize-0.3.24/src/serialize.rs:1155:5
    
    [1] https://github.com/rust-lang-deprecated/rustc-serialize/commit/75ce92452a5f7c25a58fdea81e5f6f888630a2c9
    
    PR:             276920
    Approved by:    portmgr (build fix blanket)
---
 ...tch-cargo-crates_rustc-serialize-0.3.24_src_serialize.rs | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/net/rabbiteer/files/patch-cargo-crates_rustc-serialize-0.3.24_src_serialize.rs b/net/rabbiteer/files/patch-cargo-crates_rustc-serialize-0.3.24_src_serialize.rs
new file mode 100644
index 000000000000..2ec700f0bcf5
--- /dev/null
+++ b/net/rabbiteer/files/patch-cargo-crates_rustc-serialize-0.3.24_src_serialize.rs
@@ -0,0 +1,13 @@
+https://github.com/rust-lang-deprecated/rustc-serialize/commit/75ce92452a5f7c25a58fdea81e5f6f888630a2c9
+
+--- cargo-crates/rustc-serialize-0.3.24/src/serialize.rs.orig	2024-02-10 11:58:37 UTC
++++ cargo-crates/rustc-serialize-0.3.24/src/serialize.rs
+@@ -1152,7 +1152,7 @@ impl<'a, T: ?Sized> Decodable for Cow<'a, T>
+     where T: ToOwned, T::Owned: Decodable
+ {
+     #[inline]
+-    fn decode<D: Decoder>(d: &mut D) -> Result<Cow<'static, T>, D::Error> {
++    fn decode<D: Decoder>(d: &mut D) -> Result<Cow<'a, T>, D::Error> {
+         Ok(Cow::Owned(try!(Decodable::decode(d))))
+     }
+ }