Fix clippy::println_empty_string, clippy::while_let_on_iterator, clippy::while_let_on_iterator lint style violations (#36613)

Related: #36577

Release Notes:

- N/A
This commit is contained in:
Umesh Yadav 2025-08-20 23:44:30 +05:30 committed by GitHub
parent 41e28a7185
commit ec8106d1db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 35 additions and 32 deletions

View file

@ -362,7 +362,7 @@ impl Display for DirectoryContext {
let mut is_first = true;
for descendant in &self.descendants {
if !is_first {
write!(f, "\n")?;
writeln!(f)?;
} else {
is_first = false;
}
@ -650,7 +650,7 @@ impl TextThreadContextHandle {
impl Display for TextThreadContext {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
// TODO: escape title?
write!(f, "<text_thread title=\"{}\">\n", self.title)?;
writeln!(f, "<text_thread title=\"{}\">", self.title)?;
write!(f, "{}", self.text.trim())?;
write!(f, "\n</text_thread>")
}
@ -716,7 +716,7 @@ impl RulesContextHandle {
impl Display for RulesContext {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
if let Some(title) = &self.title {
write!(f, "Rules title: {}\n", title)?;
writeln!(f, "Rules title: {}", title)?;
}
let code_block = MarkdownCodeBlock {
tag: "",