Avoid the accidental removal of comments inside expressions by dx fmt (#4410)

* Avoid the accidental removal of comments inside expressions by dx fmt

* Rewrite the logic to pass failed tests

* Removed unnecessary call to write_inline_comments

* add failing test case

* alter parsing a bit to handle more test cases

* almost there...

* fix

* use threadlocal

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
This commit is contained in:
Juan VásquezandJonathan Kelley authored and GitHub committed 2025-07-16 13:51:43 -07:00
1 parent 88c693b2e4
commit 54d465a7b5
7 files changed
+213 -21

No files matched your search

+10 -15
View File
@@ -199,20 +199,15 @@ fn app() -> Element {
}
}
}
{
exit_button(
Duration::from_secs(3),
|trigger, delay| rsx! {
{
format!(
"{:0.1?}",
trigger
.read()
.map(|inst| (delay.as_secs_f32() - inst.elapsed().as_secs_f32())),
)
}
},
)
}
{exit_button(Duration::from_secs(3), |trigger, delay| rsx! {
{
format!(
"{:0.1?}",
trigger
.read()
.map(|inst| (delay.as_secs_f32() - inst.elapsed().as_secs_f32())),
)
}
})}
}
}