Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
joe bebel committed Aug 30, 2023
1 parent c5c3e36 commit ae0ef1c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions masp_primitives/src/asset_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,14 @@ impl AssetType {
self.nonce
}

/// Deserialize an AssetType object
pub fn read<R: std::io::Read>(reader: &mut R) -> std::io::Result<Self> {
let mut atype = [0; crate::constants::ASSET_IDENTIFIER_LENGTH];
reader.read_exact(&mut atype)?;
AssetType::from_identifier(&atype).ok_or_else(|| {
std::io::Error::new(std::io::ErrorKind::InvalidData, "invalid asset type")
})
}
/// Deserialize an AssetType object
pub fn read<R: std::io::Read>(reader: &mut R) -> std::io::Result<Self> {
let mut atype = [0; crate::constants::ASSET_IDENTIFIER_LENGTH];
reader.read_exact(&mut atype)?;
AssetType::from_identifier(&atype).ok_or_else(|| {
std::io::Error::new(std::io::ErrorKind::InvalidData, "invalid asset type")
})
}
}

impl PartialEq for AssetType {
Expand Down

0 comments on commit ae0ef1c

Please sign in to comment.