Skip to content

Commit

Permalink
fmt and clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
yito88 committed Jan 18, 2024
1 parent 3edeaf6 commit 82165da
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions ibc-apps/ics721-nft-transfer/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pub trait NftTransferValidationContext {
fn can_receive_nft(&self) -> Result<(), NftTransferError>;

/// Validates that the NFT can be created or updated successfully.
///
///
/// Note: some existing ICS-721 implementations may not strictly adhere to
/// the ICS-721 class data structure. The
/// [`ClassData`](crate::types::ClassData) associated with this

Check failure on line 56 in ibc-apps/ics721-nft-transfer/src/context.rs

View workflow job for this annotation

GitHub Actions / doc_no_default_features

redundant explicit link target

Check failure on line 56 in ibc-apps/ics721-nft-transfer/src/context.rs

View workflow job for this annotation

GitHub Actions / doc_all_features

redundant explicit link target
Expand Down Expand Up @@ -90,7 +90,7 @@ pub trait NftTransferValidationContext {
) -> Result<(), NftTransferError>;

/// Validates the receiver account and the NFT input
///
///
/// Note: some existing ICS-721 implementations may not strictly adhere to
/// the ICS-721 token data structure. The
/// [`TokenData`](crate::types::TokenData) associated with this

Check failure on line 96 in ibc-apps/ics721-nft-transfer/src/context.rs

View workflow job for this annotation

GitHub Actions / doc_no_default_features

redundant explicit link target

Check failure on line 96 in ibc-apps/ics721-nft-transfer/src/context.rs

View workflow job for this annotation

GitHub Actions / doc_all_features

redundant explicit link target
Expand Down
4 changes: 1 addition & 3 deletions ibc-apps/ics721-nft-transfer/types/src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ pub struct Data(String);

impl Data {
/// Parses the data in the format specified by ICS-721.
pub fn parse_as_ics721_data(&self) -> Result<Ics721Data, NftTransferError>
{
pub fn parse_as_ics721_data(&self) -> Result<Ics721Data, NftTransferError> {
self.0.parse::<Ics721Data>()
}
}
Expand Down Expand Up @@ -63,7 +62,6 @@ impl FromStr for Data {
#[derive(Clone, Debug, Default, PartialEq, Eq)]
pub struct Ics721Data(BTreeMap<String, DataValue>);


impl FromStr for Ics721Data {
type Err = NftTransferError;

Expand Down
2 changes: 1 addition & 1 deletion ibc-apps/ics721-nft-transfer/types/src/packet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ mod tests {
assert!(data.as_ref().parse_as_ics721_data().is_ok());
};

if deser.token_data.len() > 0 {
if !deser.token_data.is_empty() {
for data in deser.token_data.iter() {
assert!(data.as_ref().parse_as_ics721_data().is_ok());
}
Expand Down

0 comments on commit 82165da

Please sign in to comment.