Skip to content

Commit dbc6eb7

Browse files
ndmitchellfacebook-github-bot
authored andcommitted
Put PartialOrd before Ord
Summary: Since PartialOrd is less restrictive it should come first. Done mainly so we can have a consistent order so I can grep for it and find these things to refactor later. Reviewed By: krallin Differential Revision: D40980308 fbshipit-source-id: 1f519cbc2c6d9553b33692e9e48f1664539647e6
1 parent 7c6986a commit dbc6eb7

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

starlark/src/codemap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ use gazebo::prelude::*;
3636

3737
/// A small, `Copy`, value representing a position in a `CodeMap`'s file.
3838
#[derive(
39-
Copy, Clone, Dupe, Hash, Eq, PartialEq, Ord, PartialOrd, Debug, Default
39+
Copy, Clone, Dupe, Hash, Eq, PartialEq, PartialOrd, Ord, Debug, Default
4040
)]
4141
pub struct Pos(u32);
4242

starlark/src/eval/bc/addr.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ use crate::eval::bc::repr::BcInstrRepr;
3434

3535
/// Address relative to bytecode start.
3636
#[derive(
37-
Eq, PartialEq, Copy, Clone, Dupe, Debug, Ord, PartialOrd, Display, Hash, Default
37+
Eq, PartialEq, Copy, Clone, Dupe, Debug, PartialOrd, Ord, Display, Hash, Default
3838
)]
3939
#[display(fmt = "@{}", _0)]
4040
pub(crate) struct BcAddr(pub(crate) u32);
@@ -204,7 +204,7 @@ impl<'b> BcPtrAddr<'b> {
204204
}
205205

206206
/// Difference between addresses.
207-
#[derive(Eq, PartialEq, Copy, Clone, Dupe, Debug, Ord, PartialOrd, Display)]
207+
#[derive(Eq, PartialEq, Copy, Clone, Dupe, Debug, PartialOrd, Ord, Display)]
208208
#[display(fmt = "{}", _0)]
209209
pub(crate) struct BcAddrOffset(pub(crate) u32);
210210

starlark/src/eval/bc/opcode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ use crate::eval::bc::instr_impl::*;
2828

2929
/// Bytecode instruction opcode.
3030
#[starlark_internal_bc]
31-
#[derive(Debug, Copy, Clone, Dupe, Eq, PartialEq, Ord, PartialOrd, Hash)]
31+
#[derive(Debug, Copy, Clone, Dupe, Eq, PartialEq, PartialOrd, Ord, Hash)]
3232
#[repr(u32)]
3333
pub(crate) enum BcOpcode {
3434
Const,

starlark/src/eval/runtime/params.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ pub(crate) enum ParameterKind<V> {
5959
KWargs,
6060
}
6161

62-
#[derive(Debug, Copy, Clone, Dupe, PartialEq, Eq, Ord, PartialOrd)]
62+
#[derive(Debug, Copy, Clone, Dupe, PartialEq, Eq, PartialOrd, Ord)]
6363
enum CurrentParameterStyle {
6464
/// Parameter can be only filled positionally.
6565
PosOnly,

starlark/src/syntax/validate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ enum ValidateError {
6666
TypeAnnotationOnTupleAssign,
6767
}
6868

69-
#[derive(Eq, PartialEq, Ord, PartialOrd)]
69+
#[derive(Eq, PartialEq, PartialOrd, Ord)]
7070
enum ArgsStage {
7171
Positional,
7272
Named,

starlark/src/values/types/string/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ pub(crate) mod simd;
6464

6565
/// Index of a char in a string.
6666
/// This is different from string byte offset.
67-
#[derive(Eq, PartialEq, Ord, PartialOrd, Copy, Clone, Dupe, Debug)]
67+
#[derive(Eq, PartialEq, PartialOrd, Ord, Copy, Clone, Dupe, Debug)]
6868
pub(crate) struct CharIndex(pub(crate) usize);
6969

7070
impl Sub for CharIndex {

0 commit comments

Comments
 (0)