Skip to content

Commit 754a24d

Browse files
author
cryshado
committed
small changes
1 parent 08d9fc0 commit 754a24d

File tree

3 files changed

+8
-14
lines changed

3 files changed

+8
-14
lines changed

.github/workflows/rust.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,6 @@ jobs:
2121

2222
- name: Run cargo tests verbosed
2323
run: cargo test --verbose
24+
25+
- name: Run cargo clippy
26+
run: cargo clippy --all-targets

src/scheme/mod.rs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ impl Deserializable for SmallStr {
8181
}
8282

8383
// version#_ commit:bits160 semantic:StrCont = Version;
84-
#[derive(Clone, Debug, Eq, PartialEq)]
84+
#[derive(Default, Clone, Debug, Eq, PartialEq)]
8585
pub struct Version {
8686
pub commit: [u8; 20],
8787
pub semantic: String,
@@ -93,15 +93,6 @@ impl Version {
9393
}
9494
}
9595

96-
impl Default for Version {
97-
fn default() -> Self {
98-
Self {
99-
commit: [0u8; 20],
100-
semantic: Default::default(),
101-
}
102-
}
103-
}
104-
10596
impl Serializable for Version {
10697
fn write_to(&self, builder: &mut BuilderData) -> ton_types::Result<()> {
10798
let semantic_bytes = self.semantic.as_bytes();
@@ -210,7 +201,7 @@ impl TvmSmc {
210201
fn tvc_frst_from_slice(slice: &mut SliceData) -> ton_types::Result<Self> {
211202
let code = Cell::construct_from_cell(slice.reference(0)?)?;
212203

213-
let meta = if slice.get_next_bit()? == true {
204+
let meta = if slice.get_next_bit()? {
214205
Some(Metadata::construct_from_cell(slice.reference(1)?)?)
215206
} else {
216207
None

src/scheme/tests.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ fn test_metadata() {
6868
let name = SmallStr::new("WalletV3".to_string());
6969

7070
let meta = Metadata::new(
71-
sold_version.clone(),
72-
linker_version.clone(),
71+
sold_version,
72+
linker_version,
7373
COMPILED_AT,
74-
name.clone(),
74+
name,
7575
DESC.to_string(),
7676
);
7777

0 commit comments

Comments
 (0)