Skip to content

Commit

Permalink
ENG-578: Simplify split_cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
aakoshh committed Mar 18, 2024
1 parent f033a5d commit 57e6ae5
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions fendermint/testing/materializer/src/docker/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,11 +278,7 @@ where
}

pub fn split_cmd(cmd: &str) -> Vec<String> {
cmd.split(' ')
.filter_map(|s| {
Some(s.trim())
.filter(|s| !s.is_empty())
.map(|s| s.to_string())
})
cmd.split_ascii_whitespace()
.map(|s| s.to_string())
.collect()
}

0 comments on commit 57e6ae5

Please sign in to comment.