Skip to content

Commit

Permalink
main: fix get_many type (#514)
Browse files Browse the repository at this point in the history
* main: fix get_many type

* CHANGELOG: record changes
  • Loading branch information
woodruffw authored Feb 24, 2023
1 parent 3797ae5 commit 70e5150
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ All versions prior to 0.2.1 are untracked.

## [Unreleased] - ReleaseDate

### Fixed

* A regression in subcommand handling was fixed
([#514](https://github.com/woodruffw/kbs2/pull/514))

## [0.7.0] - 2023-02-24

### Added
Expand Down
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::ffi::OsStr;
use std::ffi::{OsStr, OsString};
use std::process;
use std::{io, path::PathBuf};

Expand Down Expand Up @@ -326,8 +326,8 @@ fn run(matches: &ArgMatches, config: &kbs2::config::Config) -> Result<()> {
Some((cmd, matches)) => {
let cmd = format!("kbs2-{cmd}");

let ext_args: Vec<&str> = match matches.get_many::<String>("") {
Some(values) => values.map(AsRef::as_ref).collect(),
let ext_args: Vec<_> = match matches.get_many::<OsString>("") {
Some(values) => values.collect(),
None => vec![],
};

Expand Down

0 comments on commit 70e5150

Please sign in to comment.