From 12acf41c08fbf65c9b051155c56bef9b8e8e1fdc Mon Sep 17 00:00:00 2001 From: Kayos Date: Tue, 26 May 2026 10:47:45 -0700 Subject: [PATCH] vc=56 fixup: bind QName temporary before passing to local_name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit quick-xml's BytesStart::name() returns a borrowed QName; calling .as_ref() on it produced a &[u8] that outlived the QName by one expression — borrowck E0716. Hoist the QName to a local so it lives the full match arm. --- rust/strawcore/src/feed.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/rust/strawcore/src/feed.rs b/rust/strawcore/src/feed.rs index f34a88bfd..ceaf572b4 100644 --- a/rust/strawcore/src/feed.rs +++ b/rust/strawcore/src/feed.rs @@ -148,7 +148,8 @@ fn parse_rss(body: &str, channel_id: String) -> Option> { loop { match reader.read_event_into(&mut buf) { Ok(Event::Start(e)) => { - let local = local_name(e.name().as_ref()); + let name = e.name(); + let local = local_name(name.as_ref()); if local == "entry" { in_entry = true; depth = 0; @@ -176,7 +177,8 @@ fn parse_rss(body: &str, channel_id: String) -> Option> { if !in_entry { continue; } - let local = local_name(e.name().as_ref()); + let name = e.name(); + let local = local_name(name.as_ref()); // is self-closing. if local == "thumbnail" { for attr in e.attributes().flatten() { @@ -207,7 +209,8 @@ fn parse_rss(body: &str, channel_id: String) -> Option> { if !in_entry { continue; } - let local = local_name(e.name().as_ref()); + let name = e.name(); + let local = local_name(name.as_ref()); if local == "entry" { if !video_id.is_empty() { items.push(SearchItem {