Implement the new fields for plain link.
Some checks failed
clippy Build clippy has failed
rust-foreign-document-test Build rust-foreign-document-test has failed
rust-build Build rust-build has succeeded
rust-test Build rust-test has failed

This commit is contained in:
Tom Alexander
2023-12-11 13:08:53 -05:00
parent 13c62bf29f
commit 4753f4c7c6
2 changed files with 9 additions and 3 deletions

View File

@@ -139,6 +139,7 @@ pub struct PlainLink<'s> {
pub raw_link: &'s str,
pub search_option: Option<&'s str>,
pub application: Option<&'s str>,
pub post_blank: Option<&'s str>,
}
#[derive(Debug)]
@@ -702,11 +703,15 @@ impl<'s> StandardProperties<'s> for PlainLink<'s> {
}
fn get_contents<'b>(&'b self) -> Option<&'s str> {
todo!()
None
}
fn get_post_blank(&self) -> PostBlank {
todo!()
self.post_blank
.map(|post_blank| post_blank.chars().count())
.unwrap_or(0)
.try_into()
.expect("Too much post-blank to fit into a PostBlank.")
}
}