Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewvious committed Jan 16, 2024
1 parent 72e2e9a commit 95663aa
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions crates/web3_pkg/src/web3_pkg.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use std::fmt;
use std::fmt::Display;
use clap::clap_derive::ArgEnum;
use derive_builder::Builder;
use serde_derive::{Deserialize, Serialize};
use std::fmt;
use std::fmt::Display;

/// An enum representing different flavours of package payload. In some cases, a package might
/// contain a smart contract (or potentially multiple smart contracts), in other cases it could be
Expand Down Expand Up @@ -108,8 +108,16 @@ pub struct Web3Package {

impl Display for Web3Package {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
writeln!(f, "Name: {} Author: {}", self.pkg_name, self.pkg_author)?;
writeln!(f, "Type: {:?} Package Version: {}", self.pkg_type, self.pkg_version)?;
writeln!(
f,
"Name: {} Author: {}",
self.pkg_name, self.pkg_author
)?;
writeln!(
f,
"Type: {:?} Package Version: {}",
self.pkg_type, self.pkg_version
)?;
writeln!(f, "Objects:")?;
for obj in &self.pkg_objects {
writeln!(f, " {}", obj.object_cid)?;
Expand Down Expand Up @@ -152,4 +160,4 @@ impl Display for Web3PackageArchitecture {
};
write!(f, "{}", display_name)
}
}
}

0 comments on commit 95663aa

Please sign in to comment.