Skip to content

Commit

Permalink
Remove unnecessary mut in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
sbihel committed Aug 23, 2023
1 parent 63731f4 commit 50381fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Session pool manager for [cryptoki](https://github.com/parallaxsecond/rust-crypt
```rust no_run
use r2d2_cryptoki::{*, cryptoki::{context::*, types::AuthPin}};

let mut pkcs11 = Pkcs11::new("libsofthsm2.so").unwrap();
let pkcs11 = Pkcs11::new("libsofthsm2.so").unwrap();
pkcs11.initialize(CInitializeArgs::OsThreads).unwrap();
let slots = pkcs11.get_slots_with_token().unwrap();
let slot = slots.first().unwrap();
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl SessionManager {
/// # Example
/// ```no_run
/// # use r2d2_cryptoki::{*, cryptoki::{context::*, types::AuthPin}};
/// let mut pkcs11 = Pkcs11::new("libsofthsm2.so").unwrap();
/// let pkcs11 = Pkcs11::new("libsofthsm2.so").unwrap();
/// pkcs11 .initialize(CInitializeArgs::OsThreads).unwrap();
/// let slots = pkcs11.get_slots_with_token().unwrap();
/// let slot = slots.first().unwrap();
Expand All @@ -79,7 +79,7 @@ impl SessionManager {
/// # Example
/// ```no_run
/// # use r2d2_cryptoki::{*, cryptoki::{context::*, types::AuthPin}};
/// # let mut pkcs11 = Pkcs11::new("libsofthsm2.so").unwrap();
/// # let pkcs11 = Pkcs11::new("libsofthsm2.so").unwrap();
/// # pkcs11.initialize(CInitializeArgs::OsThreads);
/// # let slots = pkcs11.get_slots_with_token().unwrap();
/// # let slot = slots.first().unwrap();
Expand Down

0 comments on commit 50381fb

Please sign in to comment.