Skip to content

Commit

Permalink
fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
arvidn committed Dec 5, 2024
1 parent 29a033c commit 599f627
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
5 changes: 2 additions & 3 deletions src/serde/de_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ fn skip_or_sha_bytes<R: Read>(
}
}

type ParsedTriplesOutput = (Vec<ParsedTriple>, Option<Vec<[u8; 32]>>);

/// parse a serialized clvm object tree to an array of `ParsedTriple` objects
/// This alternative mechanism of deserialization generates an array of
Expand All @@ -111,9 +113,6 @@ fn skip_or_sha_bytes<R: Read>(
///
/// Since these values are offsets into the original buffer, that buffer needs
/// to be kept around to get the original atoms.
type ParsedTriplesOutput = (Vec<ParsedTriple>, Option<Vec<[u8; 32]>>);

pub fn parse_triples<R: Read>(
f: &mut R,
calculate_tree_hashes: bool,
Expand Down
2 changes: 0 additions & 2 deletions src/serde/object_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ impl<'a, T: Clone> ObjectCache<'a, T> {
}

/// calculate the standard `sha256tree` has for a node
pub fn treehash(
cache: &mut ObjectCache<Bytes32>,
allocator: &Allocator,
Expand All @@ -97,7 +96,6 @@ pub fn treehash(

/// calculate the serialized length (without backrefs) of a node. This is used
/// to check if using backrefs is actually smaller.
pub fn serialized_length(
cache: &mut ObjectCache<u64>,
allocator: &Allocator,
Expand Down
1 change: 0 additions & 1 deletion src/serde/write_atom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use std::io::ErrorKind;
/// from 0x00-0x7f also have a prefix encoding their length. This function
/// writes the correct prefix for an atom of size `size` whose first byte is `atom_0`.
/// If the atom is of size 0, use any placeholder first byte, as it's ignored anyway.
fn write_atom_encoding_prefix_with_size<W: io::Write>(
f: &mut W,
atom_0: u8,
Expand Down

0 comments on commit 599f627

Please sign in to comment.