Skip to content

Commit

Permalink
chore(clippy): fix Display formatting (#1026)
Browse files Browse the repository at this point in the history
  • Loading branch information
grtlr committed Jan 10, 2023
1 parent 861c41c commit 0a48876
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/inx/raw.rs
Expand Up @@ -26,14 +26,14 @@ impl<T: Packable> RawMessage<T> {
/// [`ProtocolParameters`](iota_types::block::protocol::ProtocolParameters) to verify the bytes.
pub fn inner(self, visitor: &T::UnpackVisitor) -> Result<T, InxError> {
let unpacked =
T::unpack_verified(self.data, visitor).map_err(|e| InxError::InvalidRawBytes(format!("{:?}", e)))?;
T::unpack_verified(self.data, visitor).map_err(|e| InxError::InvalidRawBytes(format!("{e:?}")))?;
Ok(unpacked)
}

/// Unpack the raw data into a type `T` without performing syntactic or semantic validation. This is useful if the
/// type is guaranteed to be well-formed, for example when it was transmitted via the INX interface.
pub fn inner_unverified(self) -> Result<T, InxError> {
let unpacked = T::unpack_unverified(self.data).map_err(|e| InxError::InvalidRawBytes(format!("{:?}", e)))?;
let unpacked = T::unpack_unverified(self.data).map_err(|e| InxError::InvalidRawBytes(format!("{e:?}")))?;
Ok(unpacked)
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/types/ledger/output_metadata.rs
Expand Up @@ -96,7 +96,7 @@ mod inx {
fn try_from(value: ::inx::proto::LedgerOutput) -> Result<Self, Self::Error> {
let data = maybe_missing!(value.output).data;
let bee_output = iota_types::block::output::Output::unpack_unverified(data)
.map_err(|e| InxError::InvalidRawBytes(format!("{:?}", e)))?;
.map_err(|e| InxError::InvalidRawBytes(format!("{e:?}")))?;

Ok(Self {
rent_structure: compute_rent_structure(&bee_output),
Expand Down

0 comments on commit 0a48876

Please sign in to comment.