mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 19:09:54 +00:00
add use_self clippy lint (#8325)
This commit is contained in:
@ -9,8 +9,8 @@ impl Compact for TxKind {
|
||||
B: bytes::BufMut + AsMut<[u8]>,
|
||||
{
|
||||
match self {
|
||||
TxKind::Create => 0,
|
||||
TxKind::Call(address) => {
|
||||
Self::Create => 0,
|
||||
Self::Call(address) => {
|
||||
address.to_compact(buf);
|
||||
1
|
||||
}
|
||||
@ -18,7 +18,7 @@ impl Compact for TxKind {
|
||||
}
|
||||
fn from_compact(buf: &[u8], identifier: usize) -> (Self, &[u8]) {
|
||||
match identifier {
|
||||
0 => (TxKind::Create, buf),
|
||||
0 => (Self::Create, buf),
|
||||
1 => {
|
||||
let (addr, buf) = Address::from_compact(buf, buf.len());
|
||||
(addr.into(), buf)
|
||||
|
||||
Reference in New Issue
Block a user