Add and use CodeLabel::filter_text() (#22054)

Release Notes:

- N/A
This commit is contained in:
Michael Sloan 2024-12-15 22:24:41 -07:00 committed by GitHub
parent af50261ae2
commit 53c9af3e61
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 14 deletions

View file

@ -1678,6 +1678,10 @@ impl CodeLabel {
pub fn text(&self) -> &str {
self.text.as_str()
}
pub fn filter_text(&self) -> &str {
&self.text[self.filter_range.clone()]
}
}
impl From<String> for CodeLabel {