Skip to content

Commit 112d408

Browse files
committed
Consistent #[derive] order
1 parent 0674858 commit 112d408

File tree

16 files changed

+22
-22
lines changed

16 files changed

+22
-22
lines changed

godot-cell/src/borrow_state.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
/// If a catastrophic error occurs, then the state will be poisoned. If the state is poisoned then that's
1919
/// almost certainly an implementation bug, and should never happen. But in an abundance of caution it is
2020
/// included to be safe.
21-
#[derive(Debug, Clone, PartialEq)]
21+
#[derive(Clone, PartialEq, Debug)]
2222
pub struct BorrowState {
2323
/// The number of `&T` references that are tracked.
2424
shared_count: usize,
@@ -267,7 +267,7 @@ impl Default for BorrowState {
267267
}
268268
}
269269

270-
#[derive(Debug, Clone, PartialEq, Eq)]
270+
#[derive(Clone, Eq, PartialEq, Debug)]
271271
pub enum BorrowStateErr {
272272
Poisoned(String),
273273
IsPoisoned,
@@ -309,7 +309,7 @@ mod proptests {
309309
}
310310
}
311311

312-
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
312+
#[derive(Copy, Clone, Eq, PartialEq, Debug)]
313313
enum Operation {
314314
IncShared,
315315
DecShared,
@@ -362,7 +362,7 @@ mod proptests {
362362
}
363363
}
364364

365-
#[derive(Debug, Clone, PartialEq, Eq)]
365+
#[derive(Clone, Eq, PartialEq, Debug)]
366366
struct OperationExecutor {
367367
vec: Vec<Operation>,
368368
}

godot-codegen/src/models/domain.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ pub enum FnDirection {
468468

469469
// ----------------------------------------------------------------------------------------------------------------------------------------------
470470

471-
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
471+
#[derive(Copy, Clone, Eq, PartialEq, Debug)]
472472
pub enum FnQualifier {
473473
Mut, // &mut self
474474
Const, // &self
@@ -715,7 +715,7 @@ impl fmt::Display for RustTy {
715715

716716
// ----------------------------------------------------------------------------------------------------------------------------------------------
717717

718-
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
718+
#[derive(Copy, Clone, Eq, PartialEq, Debug)]
719719
pub enum ArgPassing {
720720
ByValue,
721721
ByRef,

godot-codegen/src/models/domain/enums.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ pub struct Enumerator {
129129
pub value: EnumeratorValue,
130130
}
131131

132-
#[derive(Clone, Hash, Eq, PartialEq)]
132+
#[derive(Clone, Eq, PartialEq, Hash)]
133133
pub enum EnumeratorValue {
134134
Enum(i32),
135135
Bitfield(u64),

godot-core/src/builtin/color.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ impl ApproxEq for Color {
373373
}
374374

375375
/// Defines how individual color channels are laid out in memory.
376-
#[derive(Copy, Clone, Eq, PartialEq, Hash, Ord, PartialOrd, Debug)]
376+
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug)]
377377
pub enum ColorChannelOrder {
378378
/// RGBA channel order. Godot's default.
379379
RGBA,

godot-core/src/builtin/projection.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ impl ProjectionPlane {
595595
}
596596

597597
/// The eye to create a projection for, when creating a projection adjusted for head-mounted displays.
598-
#[derive(Copy, Clone, Eq, PartialEq, Hash, Ord, PartialOrd, Debug)]
598+
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug)]
599599
#[repr(C)]
600600
pub enum ProjectionEye {
601601
LEFT = 1,

godot-core/src/builtin/vectors/vector_axis.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ macro_rules! impl_vector_axis_enum {
1616
///
1717
#[doc = concat!("`", stringify!($Vector), "` implements `Index<", stringify!($AxisEnum), ">` and `IndexMut<", stringify!($AxisEnum), ">`")]
1818
#[doc = ", so you can use this type to access a vector component as `vec[axis]`."]
19-
#[derive(Copy, Clone, Eq, PartialEq, Hash, Ord, PartialOrd, Debug)]
19+
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug)]
2020
#[repr(i32)]
2121
pub enum $AxisEnum {
2222
$(

godot-core/src/docs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use std::collections::HashMap;
1919
/// }
2020
/// ```
2121
/// All fields are XML parts, escaped where necessary.
22-
#[derive(Clone, Copy, Debug, Default)]
22+
#[derive(Default, Copy, Clone, Debug)]
2323
pub struct StructDocs {
2424
pub base: &'static str,
2525
pub description: &'static str,
@@ -45,7 +45,7 @@ pub struct StructDocs {
4545
/// }
4646
/// ```
4747
/// All fields are XML parts, escaped where necessary.
48-
#[derive(Clone, Copy, Debug, Default)]
48+
#[derive(Default, Copy, Clone, Debug)]
4949
pub struct InherentImplDocs {
5050
pub methods: &'static str,
5151
pub signals_block: &'static str,

godot-core/src/meta/args/cow_arg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use std::ops::Deref;
1515

1616
/// Owned or borrowed value, used when passing arguments through `impl AsArg` to Godot APIs.
1717
#[doc(hidden)]
18-
#[derive(PartialEq)] // only for tests.
18+
#[derive(PartialEq)]
1919
pub enum CowArg<'r, T> {
2020
Owned(T),
2121
Borrowed(&'r T),

godot-core/src/meta/inspect.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
///
1212
/// Returned by [`EngineEnum::all_constants()`][crate::obj::EngineEnum::all_constants] and
1313
/// [`EngineBitfield::all_constants()`][crate::obj::EngineBitfield::all_constants].
14-
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
14+
#[derive(Copy, Clone, Eq, PartialEq, Debug)]
1515
pub struct EnumConstant<T: Copy + 'static> {
1616
rust_name: &'static str,
1717
godot_name: &'static str,

godot-core/src/meta/method_info.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use godot_ffi::conv::u32_to_usize;
1515
/// Abstraction of the low-level `sys::GDExtensionMethodInfo`.
1616
// Currently used for ScriptInstance.
1717
// TODO check overlap with (private) ClassMethodInfo.
18-
#[derive(Debug, Clone)]
18+
#[derive(Clone, Debug)]
1919
pub struct MethodInfo {
2020
pub id: i32,
2121
pub method_name: StringName,

0 commit comments

Comments
 (0)