Skip to content

Commit

Permalink
FMT fix
Browse files Browse the repository at this point in the history
  • Loading branch information
adizere committed Jan 27, 2021
1 parent bac733d commit ac5a5f9
Showing 1 changed file with 7 additions and 42 deletions.
49 changes: 7 additions & 42 deletions relayer-cli/src/commands/query/packet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,7 @@ impl QueryPacketCommitmentsCmd {
) -> Result<(ChainConfig, QueryPacketOptions), String> {
let dest_chain_config = config
.find_chain(&self.chain_id.parse().unwrap())
.ok_or_else(|| {
format!(
"missing configuration for chain ({}) ",
self.chain_id
)
})?;
.ok_or_else(|| format!("missing configuration for chain ({}) ", self.chain_id))?;

let opts = QueryPacketOptions {
port_id: self.port_id.clone(),
Expand Down Expand Up @@ -121,12 +116,7 @@ impl QueryPacketCommitmentCmd {
) -> Result<(ChainConfig, QueryPacketOptions, Sequence), String> {
let dest_chain_config = config
.find_chain(&self.chain_id.parse().unwrap())
.ok_or_else(|| {
format!(
"missing configuration for chain ({}) ",
self.chain_id
)
})?;
.ok_or_else(|| format!("missing configuration for chain ({}) ", self.chain_id))?;

let opts = QueryPacketOptions {
port_id: self.port_id.clone(),
Expand Down Expand Up @@ -212,21 +202,11 @@ impl QueryUnreceivedPacketsCmd {
) -> Result<(ChainConfig, ChainConfig, QueryPacketOptions), String> {
let src_chain_config = config
.find_chain(&self.src_chain_id.parse().unwrap())
.ok_or_else(|| {
format!(
"missing configuration for chain ({}) ",
self.src_chain_id
)
})?;
.ok_or_else(|| format!("missing configuration for chain ({}) ", self.src_chain_id))?;

let dst_chain_config = config
.find_chain(&self.dst_chain_id.parse().unwrap())
.ok_or_else(|| {
format!(
"missing configuration for chain ({}) ",
self.dst_chain_id
)
})?;
.ok_or_else(|| format!("missing configuration for chain ({}) ", self.dst_chain_id))?;

let opts = QueryPacketOptions {
port_id: self.port_id.clone(),
Expand Down Expand Up @@ -434,12 +414,7 @@ impl QueryPacketAcknowledgmentCmd {
) -> Result<(ChainConfig, QueryPacketOptions, Sequence), String> {
let dest_chain_config = config
.find_chain(&self.chain_id.parse().unwrap())
.ok_or_else(|| {
format!(
"missing configuration for chain ({}) ",
self.chain_id
)
})?;
.ok_or_else(|| format!("missing configuration for chain ({}) ", self.chain_id))?;

let opts = QueryPacketOptions {
port_id: self.port_id.clone(),
Expand Down Expand Up @@ -525,21 +500,11 @@ impl QueryUnreceivedAcknowledgementCmd {
) -> Result<(ChainConfig, ChainConfig, QueryPacketOptions), String> {
let src_chain_config = config
.find_chain(&self.src_chain_id.parse().unwrap())
.ok_or_else(|| {
format!(
"missing configuration for chain ({}) ",
self.src_chain_id
)
})?;
.ok_or_else(|| format!("missing configuration for chain ({}) ", self.src_chain_id))?;

let dst_chain_config = config
.find_chain(&self.dst_chain_id.parse().unwrap())
.ok_or_else(|| {
format!(
"missing configuration for chain ({}) ",
self.dst_chain_id
)
})?;
.ok_or_else(|| format!("missing configuration for chain ({}) ", self.dst_chain_id))?;

let opts = QueryPacketOptions {
port_id: self.port_id.clone(),
Expand Down

0 comments on commit ac5a5f9

Please sign in to comment.