Closed chiefbiiko closed 4 years ago
@jedisct1 would be awesome if you could have a look
if you want to merge, would either need to bump libhydrogen-sys
to sth like 0.9.0
(forgot this in scope of jedisct1/rust-libhydrogen-sys#2) or just undo the libhydrogen-sys > 0.8.1
requirement in this pr's cargo toml
Hi!
And sorry for the delay; I completely forgot about your pull request.
Looking good!
I'm going to push an update version to crates.io
Thanks again for contributing this!
impl State {
pub fn new() -> State {
unsafe { MaybeUninit::<State>::uninit().assume_init() }
}
}
Maybe the public interface shouldn't allow returning an uninitialized state.
It may be safer to let functions such as kk_1
return a state instead.
Same for returned packets. For example n_1()
could return an initialized NPacket1
instead of accepting an empty one.
So, maybe all the &mut
parameters currently required could be replaced with things these functions return.
thanks for your feedback! will prepare a follow-up pr
implements the
kx
modulerequires
libhydrogen-sys > 0.8.1
(4NOISE_NK
) ~ see https://github.com/jedisct1/rust-libhydrogen-sys/pull/2bumps the crate version to
0.4.0