Commit ca0c3d2
committed
musig: remove SessionSecretRand::new constructor
This is just a convenience wrapper around
SessionSecretRand::from_rng(&mut rng()). The name `new` disguises the
fact that this is an impure function and actually calls a RNG every time
it is called. It is also unused, in the docs or in the tests.
Finally, clippy complains about it because it feels that a `new`
method should always be accompanied by a `Default` impl...which is fair,
but the impurity is veen more surprising for `default` than for `new`.
Since `rand` renamed `thread_rng` to just `rng` the keystroke-saving
value of this method is less. So just delete it.1 parent dd90c53 commit ca0c3d2
1 file changed
+2
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | 45 | | |
50 | 46 | | |
51 | 47 | | |
| |||
59 | 55 | | |
60 | 56 | | |
61 | 57 | | |
62 | | - | |
63 | | - | |
| 58 | + | |
| 59 | + | |
64 | 60 | | |
65 | 61 | | |
66 | 62 | | |
| |||
0 commit comments