Skip to content

Commit d49330d

Browse files
committed
Update README.md, and test it going forward.
1 parent de36b8e commit d49330d

File tree

5 files changed

+20
-9
lines changed

5 files changed

+20
-9
lines changed

.github/workflows/rust.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ jobs:
5555
tool: cargo-llvm-cov, nextest
5656

5757
- name: Test
58-
run: cargo llvm-cov nextest --no-fail-fast --lcov --output-path lcov.info
58+
run: |
59+
cargo test --doc
60+
cargo llvm-cov nextest --no-fail-fast --lcov --output-path lcov.info
5961
6062
- name: Upload Coverage
6163
if: matrix.os == 'ubuntu-latest'

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.2.0+1] - 2025-06-01
9+
10+
### Changed
11+
12+
- Updated examples in `README.md` to reflect the new API.
13+
814
## [0.2.0] - 2025-06-01
915

1016
### Added

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "proc-result"
33
description = "A tiny cross-platform library containing exit status and code types"
44
repository = "http://crates.lurey.io/proc-result"
55
license = "MIT"
6-
version = "0.2.0"
6+
version = "0.2.0+1"
77
edition = "2024"
88
keywords = ["cli", "exit-codes", "sysexit"]
99
categories = [

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,22 @@ recorded from a Linux process, or vice versa.
1616

1717
## Usage
1818

19-
Most users of the crate will use the `ToProcResult` trait, which converts the
20-
result a run of a subprocess to a `ProcResult`, either a successful or an error
21-
explaining what exit code or (on Unix platforms) the signal the subprocess was
22-
prematurely terminated with, and is constructed from a
19+
Most users of the crate will use the `ProcResult` enum, which represents the
20+
result a run of a explaining what exit code or (on Unix platforms) the signal
21+
the subprocess was prematurely terminated with, and is constructed from a
2322
`std::process::ExitStatus`:
2423

2524
```rust
26-
use proc_result::ToProcResult;
25+
use proc_result::ProcResult;
2726
use std::error::Error;
2827
use std::process::Command;
2928

3029
fn main() -> Result<(), Box<dyn Error>> {
31-
let result = Command::new("ls").status()?.to_proc_result()?;
30+
let result: ProcResult = Command::new("ls").status()?.into();
31+
32+
// Ensures exit code 0.
33+
result.ok()?;
34+
3235
Ok(())
3336
}
3437
```

0 commit comments

Comments
 (0)