Skip to content

Commit 50e2d5b

Browse files
committed
apply clippy suggestions
1 parent 2f435f5 commit 50e2d5b

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

crates/wasmi/src/engine/translator/func/encoder.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,7 @@ impl<T> From<Pos<T>> for BytePos {
6262
impl<T> Copy for Pos<T> {}
6363
impl<T> Clone for Pos<T> {
6464
fn clone(&self) -> Self {
65-
Self {
66-
value: self.value.clone(),
67-
marker: PhantomData,
68-
}
65+
*self
6966
}
7067
}
7168
impl<T> PartialEq for Pos<T> {
@@ -76,7 +73,7 @@ impl<T> PartialEq for Pos<T> {
7673
impl<T> Eq for Pos<T> {}
7774
impl<T> PartialOrd for Pos<T> {
7875
fn partial_cmp(&self, other: &Self) -> Option<cmp::Ordering> {
79-
self.value.partial_cmp(&other.value)
76+
Some(self.cmp(other))
8077
}
8178
}
8279
impl<T> Ord for Pos<T> {

0 commit comments

Comments
 (0)