diff options
| author | Steven Fackler <[email protected]> | 2016-11-05 10:54:17 -0700 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2016-11-05 10:54:17 -0700 |
| commit | f15c817c2d1fad288fe0f88d4e3995df4aa4a477 (patch) | |
| tree | 01654c34f4c71b7ee30b5ba7b6e0bde61cd905da /openssl/src/bn.rs | |
| parent | Remove unused dependency (diff) | |
| download | rust-openssl-f15c817c2d1fad288fe0f88d4e3995df4aa4a477.tar.xz rust-openssl-f15c817c2d1fad288fe0f88d4e3995df4aa4a477.zip | |
Rustfmt
Diffstat (limited to 'openssl/src/bn.rs')
| -rw-r--r-- | openssl/src/bn.rs | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/openssl/src/bn.rs b/openssl/src/bn.rs index a3235c1f..fe3645d0 100644 --- a/openssl/src/bn.rs +++ b/openssl/src/bn.rs @@ -365,22 +365,12 @@ impl BigNumRef { /// * `bits`: Length of the number in bits. /// * `msb`: The desired properties of the number. /// * `odd`: If `true`, the generated number will be odd. - pub fn rand(&mut self, - bits: i32, - msb: MsbOption, - odd: bool) - -> Result<(), ErrorStack> { - unsafe { - cvt(ffi::BN_rand(self.as_ptr(), bits.into(), msb.0, odd as c_int)).map(|_| ()) - } + pub fn rand(&mut self, bits: i32, msb: MsbOption, odd: bool) -> Result<(), ErrorStack> { + unsafe { cvt(ffi::BN_rand(self.as_ptr(), bits.into(), msb.0, odd as c_int)).map(|_| ()) } } /// The cryptographically weak counterpart to `rand`. - pub fn pseudo_rand(&mut self, - bits: i32, - msb: MsbOption, - odd: bool) - -> Result<(), ErrorStack> { + pub fn pseudo_rand(&mut self, bits: i32, msb: MsbOption, odd: bool) -> Result<(), ErrorStack> { unsafe { cvt(ffi::BN_pseudo_rand(self.as_ptr(), bits.into(), msb.0, odd as c_int)).map(|_| ()) } |