Merge a3a345147705ba3eb3d8032b8eadc48d3085a933 into 9b09146a6b5e936966ed7ee73bce9dd2df3810ae

This commit is contained in:
Patrik Simic 2025-05-07 20:32:12 +09:00 committed by GitHub
commit 7956e06ab6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -414,7 +414,7 @@ impl Content {
/// Elements produced in `show` rules will not be included in the results.
pub fn query(&self, selector: Selector) -> Vec<Content> {
let mut results = Vec::new();
self.traverse(&mut |element| -> ControlFlow<()> {
let _ = self.traverse(&mut |element| -> ControlFlow<()> {
if selector.matches(&element, None) {
results.push(element);
}
@ -441,7 +441,7 @@ impl Content {
/// Extracts the plain text of this content.
pub fn plain_text(&self) -> EcoString {
let mut text = EcoString::new();
self.traverse(&mut |element| -> ControlFlow<()> {
let _ = self.traverse(&mut |element| -> ControlFlow<()> {
if let Some(textable) = element.with::<dyn PlainText>() {
textable.plain_text(&mut text);
}