-
Notifications
You must be signed in to change notification settings - Fork 1.7k
update ring to 0.14 #10262
update ring to 0.14 #10262
Conversation
* master: Fix join-set test to be deterministic. (#10263)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same remark for all the unsafe
blocks.
use super::{Crypto, Error}; | ||
use super::{Crypto, Error, NonZeroU32}; | ||
|
||
const ITERATIONS: NonZeroU32 = unsafe { NonZeroU32::new_unchecked(10240) }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although this is technically safe, by ideology it's probably better to not use any unsafe anywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
by ideology it's probably better to not use any unsafe anywhere
Well, I don't think we should treat "don't use unsafe" as a dogma. The are different kinds of unsafe code. Here the unsafety of new_unchecked
comes from const-control-flow
(and probably const_panic
) being unstable.
And, in this case, for literals and constants it's easy to reason about the safety.
Nevertheless, I've eliminated all the calls to new_unchecked
.
* master: fix: parity-clib/examples/cpp/CMakeLists.txt (#10313) CI optimizations (#10297) Increase number of requested block bodies in chain sync (#10247) Deprecate account management (#10213) Properly handle check_epoch_end_signal errors (#10015) fix(osx and windows builds): bump parity-daemonize (#10291) Add missing step for Using `systemd` service file (#10175) Call private contract methods from another private contract (read-only) (#10086) update ring to 0.14 (#10262) fix(secret-store): deprecation warning (#10301) Update to jsonrpc-derive 10.0.2, fixes aliases bug (#10300) Convert to jsonrpc-derive, use jsonrpc-* from crates.io (#10298)
This update is necessary, since ring 0.13 is going to be yanked soon.
Change from
u32
toNonZeroU32
in parity-crypto was pretty invasive (b347599)