Update rustfmt to the 2024 style edition (#35764)

* Use 2024 style edition

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Reformat all code

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
Simon Wülker 2025-03-03 12:26:53 +01:00 committed by GitHub
parent 6300e820b4
commit 3d320fa96a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
603 changed files with 1739 additions and 1648 deletions

View file

@ -8,11 +8,11 @@
// except according to those terms.
use keyboard_types::{Key, Modifiers};
use script::test::DOMString;
use script::test::textinput::{
ClipboardProvider, Direction, Lines, Selection, SelectionDirection, TextInput, TextPoint,
UTF16CodeUnits, UTF8Bytes,
UTF8Bytes, UTF16CodeUnits,
};
use script::test::DOMString;
pub struct DummyClipboardContext {
content: String,
@ -104,8 +104,8 @@ fn test_textinput_when_inserting_multiple_lines_still_respects_max_length() {
}
#[test]
fn test_textinput_when_content_is_already_longer_than_max_length_and_theres_no_selection_dont_insert_anything(
) {
fn test_textinput_when_content_is_already_longer_than_max_length_and_theres_no_selection_dont_insert_anything()
{
let mut textinput = TextInput::new(
Lines::Single,
DOMString::from("abc"),
@ -121,8 +121,8 @@ fn test_textinput_when_content_is_already_longer_than_max_length_and_theres_no_s
}
#[test]
fn test_multi_line_textinput_with_maxlength_doesnt_allow_appending_characters_when_input_spans_lines(
) {
fn test_multi_line_textinput_with_maxlength_doesnt_allow_appending_characters_when_input_spans_lines()
{
let mut textinput = TextInput::new(
Lines::Multiple,
DOMString::from("abc\nd"),
@ -138,8 +138,8 @@ fn test_multi_line_textinput_with_maxlength_doesnt_allow_appending_characters_wh
}
#[test]
fn test_single_line_textinput_with_max_length_doesnt_allow_appending_characters_when_replacing_a_selection(
) {
fn test_single_line_textinput_with_max_length_doesnt_allow_appending_characters_when_replacing_a_selection()
{
let mut textinput = TextInput::new(
Lines::Single,
DOMString::from("abcde"),
@ -238,8 +238,8 @@ fn test_single_line_textinput_with_max_length_inside_char() {
}
#[test]
fn test_single_line_textinput_with_max_length_doesnt_allow_appending_characters_after_max_length_is_reached(
) {
fn test_single_line_textinput_with_max_length_doesnt_allow_appending_characters_after_max_length_is_reached()
{
let mut textinput = TextInput::new(
Lines::Single,
DOMString::from("a"),