diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 18b61ae..a13e016 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -26,7 +26,7 @@ on: jobs: ci: name: Format, lint, and test - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: davidB/rust-cargo-make@v1 diff --git a/README.md b/README.md index 9467685..3afe621 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,8 @@ Easily add a `--input` and `--output` flags to CLIs using clap cargo run --example copy -- --help ``` - ## LICENSE Copyright © 2023 Swift Navigation -Distributed under the [MIT open source license](LICENSE). \ No newline at end of file +Distributed under the [MIT open source license](LICENSE). diff --git a/examples/positional.rs b/examples/positional.rs index a9c1931..6d8a513 100644 --- a/examples/positional.rs +++ b/examples/positional.rs @@ -19,8 +19,7 @@ use anyhow::Result; -use clap::{Parser, CommandFactory}; -use clap_io::{Input, Output}; +use clap::Parser; macro_rules! converter { ($name:ident) => { diff --git a/src/lib.rs b/src/lib.rs index ffcc6d3..31a6347 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -98,7 +98,7 @@ pub struct Input(Stream); impl Input { /// Open the input stream. - pub fn open(self) -> io::Result> { + pub fn open(self) -> io::Result> { match self.0 { Stream::File(_) => { let file = self.open_file().unwrap()?; @@ -194,7 +194,7 @@ pub struct Output(Stream); impl Output { /// Open the output stream. - pub fn open(self) -> io::Result> { + pub fn open(self) -> io::Result> { match self.0 { Stream::File(_) => { let file = self.open_file().unwrap()?;