You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm basically running the code given in the first example code block of the documentation, just trying to generate a key pair. However, when running the code I get this error:
```error[E0599]: no function or associated item named new found for struct `OsRng` in the current scope
--> src/main.rs:7:26
|
7 | let mut rng = OsRng::new().expect("OsRng");
| ^^^ function or associated item not found in `OsRng`
Furthermore, I've included the rand feature in Cargo.toml:
secp256k1 = { version = "0.21.2", features = ["rand"] }
The text was updated successfully, but these errors were encountered:
I'm basically running the code given in the first example code block of the documentation, just trying to generate a key pair. However, when running the code I get this error:
```error[E0599]: no function or associated item named
new
found for struct `OsRng` in the current scope--> src/main.rs:7:26
|
7 | let mut rng = OsRng::new().expect("OsRng");
| ^^^ function or associated item not found in `OsRng`
The text was updated successfully, but these errors were encountered: