Skip to content

Commit

Permalink
Minimize diff
Browse files Browse the repository at this point in the history
  • Loading branch information
vitorenesduarte committed Feb 4, 2021
1 parent 7755fec commit 70e70f6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
9 changes: 4 additions & 5 deletions modules/src/mock/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -394,9 +394,9 @@ impl ChannelKeeper for MockContext {
fn next_channel_id(&mut self) -> ChannelId {
let prefix = ChannelId::default().to_string();
let suffix = self.channel_ids_counter;
let channel_id = ChannelId::from_str(format!("{}-{}", prefix, suffix).as_str()).unwrap();
self.channel_ids_counter += 1;
channel_id

ChannelId::from_str(format!("{}-{}", prefix, suffix).as_str()).unwrap()
}

fn store_channel(
Expand Down Expand Up @@ -499,10 +499,9 @@ impl ConnectionKeeper for MockContext {
fn next_connection_id(&mut self) -> ConnectionId {
let prefix = ConnectionId::default().to_string();
let suffix = self.connection_ids_counter;
let connection_id =
ConnectionId::from_str(format!("{}-{}", prefix, suffix).as_str()).unwrap();
self.connection_ids_counter += 1;
connection_id

ConnectionId::from_str(format!("{}-{}", prefix, suffix).as_str()).unwrap()
}

fn store_connection(
Expand Down
4 changes: 2 additions & 2 deletions modules/tests/model_based.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,10 @@ fn main() {

for test in tests {
let path = format!("{}/{}.json", TESTS_DIR, test);
let test_executor = ICS02TestExecutor::new();
let executor = ICS02TestExecutor::new();
// we should be able to just return the `Result` once the following issue
// is fixed: https://github.com/rust-lang/rust/issues/43301
if let Err(e) = modelator::test_driver(test_executor, path) {
if let Err(e) = modelator::test_driver(executor, path) {
panic!("{:?}", e);
}
}
Expand Down

0 comments on commit 70e70f6

Please sign in to comment.