Skip to content

Commit

Permalink
chore: lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
shakyShane committed Jun 14, 2020
1 parent 0627ae7 commit e05b31b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions wf2_core/src/cli/cli_output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ impl CLIOutput {
.recipe
.map(RecipeKinds::select)
.map(|r| r.subcommands(&ctx))
.unwrap_or_else(|| vec![]);
.unwrap_or_else(Vec::new);

let internal_cmd = internal_commands()
.iter()
Expand Down Expand Up @@ -192,7 +192,7 @@ fn collect_apps(ctx: &Context) -> Vec<App> {
.recipe
.map(RecipeKinds::select)
.map(|r| r.subcommands(&ctx))
.unwrap_or_else(|| vec![]);
.unwrap_or_else(Vec::new);

// this is all of the individual recipe 'global' commands
// global meaning that the recipe can register a command
Expand Down
2 changes: 1 addition & 1 deletion wf2_core/src/commands/timelog/jira.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ fn to_fut(
tx.send(Worklog::items_from_jira(
jira.clone(),
key.clone(),
status_name.clone(),
status_name,
))
.map_err(|_e| eprintln!("lost communication with channel"))
}));
Expand Down
2 changes: 1 addition & 1 deletion wf2_core/src/commands/timelog/jira_worklog_result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ impl WorklogResult {
.for_each(|wl| {
let dt = wl.started.parse::<DateTime<Utc>>().expect("can parse");
let lookup = dt.format(JIRA_DATE_FORMAT).to_string();
let entry = hm.entry(lookup).or_insert_with(|| vec![]);
let entry = hm.entry(lookup).or_insert_with(Vec::new);
entry.push(wl.clone());
});

Expand Down
2 changes: 1 addition & 1 deletion wf2_core/src/recipes/m2/subcommands/m2_playground_cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ impl<'a, 'b> CliCommand<'a, 'b> for M2PlaygroundCmd {
let write = Task::file_write(
target_file.expect("target file"),
"Writes the credentials to file for next time",
serde_json::to_vec_pretty(&*pg.clone()).expect("serde=safe"),
serde_json::to_vec_pretty(&*pg).expect("serde=safe"),
);

Task::conditional(
Expand Down
2 changes: 1 addition & 1 deletion wf2_core/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pub fn path_buf_to_string(pb: &PathBuf) -> String {
}

pub fn two_col(commands: Vec<(String, String)>) -> String {
match commands.clone().get(0) {
match commands.get(0) {
Some(_t) => {
let longest = commands.iter().fold(
commands[0].clone(),
Expand Down

0 comments on commit e05b31b

Please sign in to comment.