Skip to content

Commit 271d285

Browse files
Merge pull request #116 from brotskydotcom/readme-example-fix
2 parents 2765999 + b87ffd4 commit 271d285

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## Version 2.0.1
2+
- fix the example in the README.
3+
14
## Version 2.0
25
- (API change) Allow creation of entries to fail.
36
- (API change) Introduce an ambiguous error on credential lookup.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ keywords = ["password", "credential", "keychain", "keyring", "cross-platform"]
66
license = "MIT OR Apache-2.0"
77
name = "keyring"
88
repository = "https://github.com/hwchen/keyring-rs.git"
9-
version = "2.0.0"
9+
version = "2.0.1"
1010
edition = "2021"
1111
exclude = [".github/"]
1212
readme = "README.md"

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ and removed using the `delete_password` method.
3030
use keyring::{Entry, Result};
3131

3232
fn main() -> Result<()> {
33-
let entry = Entry::new("my_service", "my_name");
33+
let entry = Entry::new("my_service", "my_name")?;
3434
entry.set_password("topS3cr3tP4$$w0rd")?;
3535
let password = entry.get_password()?;
3636
println!("My password is '{}'", password);

src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,8 @@ impl Entry {
258258
}
259259
}
260260

261-
#[cfg(test)]
262-
doc_comment::doctest!("../README.md");
261+
#[cfg(doctest)]
262+
doc_comment::doctest!("../README.md", readme);
263263

264264
#[cfg(test)]
265265
/// There are no actual tests in this module.

0 commit comments

Comments
 (0)