mirror of
https://github.com/servo/servo.git
synced 2025-07-23 23:33:43 +01:00
Fixed some clippy warnings in components (#32107)
* Fixed some clippy warnings in components * Updated handling of NaN values in comparison * Updated formatting using ./mach fmt
This commit is contained in:
parent
f70413baba
commit
007a72fe4d
9 changed files with 20 additions and 29 deletions
|
@ -98,10 +98,7 @@ impl LayoutHTMLTextAreaElementHelpers for LayoutDom<'_, HTMLTextAreaElement> {
|
|||
if text.is_empty() {
|
||||
// FIXME(nox): Would be cool to not allocate a new string if the
|
||||
// placeholder is single line, but that's an unimportant detail.
|
||||
self.placeholder()
|
||||
.replace("\r\n", "\n")
|
||||
.replace('\r', "\n")
|
||||
.into()
|
||||
self.placeholder().replace("\r\n", "\n").replace('\r', "\n")
|
||||
} else {
|
||||
text.into()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue