Skip to content

Commit

Permalink
build: toolchain update to 1.73.0
Browse files Browse the repository at this point in the history
  • Loading branch information
shuimuliang committed Oct 6, 2023
1 parent 582cad2 commit dbc8fc9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

strategy:
matrix:
rust-version: [1.72.1]
rust-version: [1.73.0]

steps:
- name: Checkout code
Expand Down
20 changes: 10 additions & 10 deletions anychain-ripple/src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -489,30 +489,30 @@ impl PartialEq for SerializedType {
}
}

impl PartialOrd for SerializedType {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
impl Ord for SerializedType {
fn cmp(&self, other: &Self) -> Ordering {
let typ0 = self.typ() as u32;
let val0 = self.val();
let typ1 = other.typ() as u32;
let val1 = other.val();

if typ0 < typ1 {
Some(Ordering::Less)
Ordering::Less
} else if typ0 > typ1 {
Some(Ordering::Greater)
Ordering::Greater
} else if val0 < val1 {
Some(Ordering::Less)
Ordering::Less
} else if val0 > val1 {
Some(Ordering::Greater)
Ordering::Greater
} else {
Some(Ordering::Equal)
Ordering::Equal
}
}
}

impl Ord for SerializedType {
fn cmp(&self, other: &Self) -> Ordering {
self.partial_cmp(other).unwrap()
impl PartialOrd for SerializedType {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
Some(self.cmp(other))
}
}

Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[toolchain]
channel = "1.72.1"
channel = "1.73.0"
components = ["clippy", "rustfmt"]
targets = []
profile = "minimal"

0 comments on commit dbc8fc9

Please sign in to comment.