Skip to content

Commit

Permalink
Merge pull request #40 from epage/err
Browse files Browse the repository at this point in the history
fix: Report more context on errors
  • Loading branch information
epage authored Sep 8, 2023
2 parents 06b2579 + 0c7d15f commit f150858
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .clippy.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
msrv = "1.69.0" # MSRV
msrv = "1.70.0" # MSRV
warn-on-all-wildcard-imports = true
allow-expect-in-tests = true
allow-unwrap-in-tests = true
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ jobs:
- name: No-default features
run: cargo test --workspace --no-default-features
msrv:
name: "Check MSRV: 1.69.0"
name: "Check MSRV: 1.70.0"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.69.0 # MSRV
toolchain: 1.70.0 # MSRV
- uses: Swatinem/rust-cache@v2
- name: Default features
run: cargo check --workspace --all-targets
Expand Down Expand Up @@ -119,7 +119,7 @@ jobs:
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.69.0 # MSRV
toolchain: 1.70.0 # MSRV
components: clippy
- uses: Swatinem/rust-cache@v2
- name: Install SARIF tools
Expand Down
7 changes: 7 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ resolver = "2"
[workspace.package]
license = "MIT OR Apache-2.0"
edition = "2021"
rust-version = "1.69.0" # MSRV
rust-version = "1.70.0" # MSRV
include = [
"build.rs",
"src/**/*",
Expand Down Expand Up @@ -47,6 +47,7 @@ default = []
response = ["shlex"]

[dependencies]
fs-err = "2.9.0"
os_str_bytes = "6.0"
shlex = { version = "1.1.0", optional = true }

Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ where
match next {
Argument::PassThrough(arg) => expanded_args.push(arg),
Argument::Path(path) => {
let content = std::fs::read_to_string(path)?;
let content = fs_err::read_to_string(path)?;
let new_args = parser(&content, prefix);
todo.reserve(new_args.len());
for (i, arg) in new_args.into_iter().enumerate() {
Expand Down

0 comments on commit f150858

Please sign in to comment.