Skip to content

Commit

Permalink
Fix lifetime in ElementRef::attr return value
Browse files Browse the repository at this point in the history
This makes it usable in more contexts.
  • Loading branch information
g2p committed Oct 27, 2023
1 parent 6d1e03b commit 33f0aea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/element_ref/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ impl<'a> ElementRef<'a> {
}

/// Returns the value of an attribute.
pub fn attr(&self, attr: &str) -> Option<&str> {
pub fn attr(&self, attr: &str) -> Option<&'a str> {
self.value().attr(attr)
}

Expand Down

0 comments on commit 33f0aea

Please sign in to comment.