diff options
author | Clément DAVID <c.david86@gmail.com> | 2017-08-23 14:10:08 +0200 |
---|---|---|
committer | Clément DAVID <c.david86@gmail.com> | 2017-08-23 21:38:44 +0200 |
commit | c5fe2351124c673d1dc4d59355a03654b4fcc541 (patch) | |
tree | baa752c3c7847e85c0e50389400b45f7bf2fc390 /components/script/textinput.rs | |
parent | ab73f3d61d895289898821272f6af2665c9c645c (diff) | |
download | servo-c5fe2351124c673d1dc4d59355a03654b4fcc541.tar.gz servo-c5fe2351124c673d1dc4d59355a03654b4fcc541.zip |
order derivable traits lists
Ignoring :
- **generated**.rs
- python/tidy/servo_tidy_tests/rust_tidy.rs
Diffstat (limited to 'components/script/textinput.rs')
-rw-r--r-- | components/script/textinput.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/components/script/textinput.rs b/components/script/textinput.rs index d1c473f5ad8..0ac002b9b9f 100644 --- a/components/script/textinput.rs +++ b/components/script/textinput.rs @@ -16,13 +16,13 @@ use std::ops::Range; use std::usize; use unicode_segmentation::UnicodeSegmentation; -#[derive(Copy, Clone, PartialEq)] +#[derive(Clone, Copy, PartialEq)] pub enum Selection { Selected, NotSelected } -#[derive(JSTraceable, PartialEq, Copy, Clone, HeapSizeOf)] +#[derive(Clone, Copy, HeapSizeOf, JSTraceable, PartialEq)] pub enum SelectionDirection { Forward, Backward, @@ -49,7 +49,7 @@ impl From<SelectionDirection> for DOMString { } } -#[derive(JSTraceable, Copy, Clone, HeapSizeOf, PartialEq)] +#[derive(Clone, Copy, HeapSizeOf, JSTraceable, PartialEq)] pub struct TextPoint { /// 0-based line number pub line: usize, @@ -58,7 +58,7 @@ pub struct TextPoint { } /// Encapsulated state for handling keyboard input in a single or multiline text input control. -#[derive(JSTraceable, HeapSizeOf)] +#[derive(HeapSizeOf, JSTraceable)] pub struct TextInput<T: ClipboardProvider> { /// Current text input content, split across lines without trailing '\n' lines: Vec<DOMString>, @@ -96,14 +96,14 @@ impl Default for TextPoint { } /// Control whether this control should allow multiple lines. -#[derive(PartialEq, Eq)] +#[derive(Eq, PartialEq)] pub enum Lines { Single, Multiple, } /// The direction in which to delete a character. -#[derive(PartialEq, Eq, Copy, Clone)] +#[derive(Clone, Copy, Eq, PartialEq)] pub enum Direction { Forward, Backward |