Fix lifetimes.

This commit is contained in:
Tom Alexander 2023-10-08 14:13:02 -04:00
parent 42dbda494a
commit 3041a575f9
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -668,17 +668,17 @@ pub enum LinkType<'s> {
impl<'s> RegularLink<'s> { impl<'s> RegularLink<'s> {
/// Orgify the raw_link if it contains line breaks. /// Orgify the raw_link if it contains line breaks.
pub fn get_raw_link(&'s self) -> Cow<'s, str> { pub fn get_raw_link<'b>(&'b self) -> Cow<'b, str> {
coalesce_whitespace_if_line_break(&self.raw_link) coalesce_whitespace_if_line_break(&self.raw_link)
} }
/// Orgify the path if it contains line breaks. /// Orgify the path if it contains line breaks.
pub fn get_path(&'s self) -> Cow<'s, str> { pub fn get_path<'b>(&'b self) -> Cow<'b, str> {
coalesce_whitespace_if_line_break(&self.path) coalesce_whitespace_if_line_break(&self.path)
} }
/// Orgify the search_option if it contains line breaks. /// Orgify the search_option if it contains line breaks.
pub fn get_search_option(&'s self) -> Option<Cow<'s, str>> { pub fn get_search_option<'b>(&'b self) -> Option<Cow<'b, str>> {
self.search_option self.search_option
.as_ref() .as_ref()
.map(|search_option| coalesce_whitespace_if_line_break(search_option.borrow())) .map(|search_option| coalesce_whitespace_if_line_break(search_option.borrow()))