Since value and path are always the same for radio links, I removed the extra value.

This commit is contained in:
Tom Alexander
2023-10-07 01:46:22 -04:00
parent 592e773920
commit 6973d5a2c0
3 changed files with 9 additions and 7 deletions

View File

@@ -98,7 +98,6 @@ pub struct RadioTarget<'s> {
pub struct RadioLink<'s> {
pub source: &'s str,
pub path: &'s str,
pub raw_link: &'s str, // TODO: Is this always the same as path? If so, this could be a function instead of a field.
pub children: Vec<Object<'s>>,
}
@@ -720,3 +719,9 @@ impl<'s> RegularLink<'s> {
})
}
}
impl<'s> RadioLink<'s> {
pub fn get_raw_link(&self) -> &'s str {
self.path
}
}