Removing unused warnings in nightly (#6169)

This commit is contained in:
Patrik Simic 2025-05-20 18:25:26 +02:00 committed by GitHub
parent d42d2ed200
commit ca8d223fde
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. /// Elements produced in `show` rules will not be included in the results.
pub fn query(&self, selector: Selector) -> Vec<Content> { pub fn query(&self, selector: Selector) -> Vec<Content> {
let mut results = Vec::new(); let mut results = Vec::new();
self.traverse(&mut |element| -> ControlFlow<()> { let _ = self.traverse(&mut |element| -> ControlFlow<()> {
if selector.matches(&element, None) { if selector.matches(&element, None) {
results.push(element); results.push(element);
} }
@ -441,7 +441,7 @@ impl Content {
/// Extracts the plain text of this content. /// Extracts the plain text of this content.
pub fn plain_text(&self) -> EcoString { pub fn plain_text(&self) -> EcoString {
let mut text = EcoString::new(); let mut text = EcoString::new();
self.traverse(&mut |element| -> ControlFlow<()> { let _ = self.traverse(&mut |element| -> ControlFlow<()> {
if let Some(textable) = element.with::<dyn PlainText>() { if let Some(textable) = element.with::<dyn PlainText>() {
textable.plain_text(&mut text); textable.plain_text(&mut text);
} }