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

@@ -41,7 +41,6 @@ pub(crate) fn radio_link<'b, 'g, 'r, 's>(
source: source.into(),
children: rematched_target,
path: path.into(),
raw_link: path.into(),
},
));
}
@@ -194,8 +193,7 @@ mod tests {
&Object::RadioLink(RadioLink {
source: "bar ",
children: vec![Object::PlainText(PlainText { source: "bar" })],
path: "bar".into(),
raw_link: "bar".into()
path: "bar".into()
})
);
}
@@ -238,8 +236,7 @@ mod tests {
source: "*bar* ",
children: vec![Object::PlainText(PlainText { source: "bar" })]
})],
path: "*bar* ".into(),
raw_link: "*bar* ".into()
path: "*bar* ".into()
})
);
}