Commit 31879a0c authored by Bernd Krietenstein's avatar Bernd Krietenstein
Browse files

Fixed clippy warning for unnecessary cast

parent c57a9934
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -228,7 +228,7 @@ impl X509Builder {
    /// the X.509 standard should pass `2` to this method.
    #[corresponds(X509_set_version)]
    pub fn set_version(&mut self, version: i32) -> Result<(), ErrorStack> {
        unsafe { cvt(ffi::X509_set_version(self.0.as_ptr(), version.into())).map(|_| ()) }
        unsafe { cvt(ffi::X509_set_version(self.0.as_ptr(), version as c_long)).map(|_| ()) }
    }

    /// Sets the serial number of the certificate.
@@ -1147,7 +1147,7 @@ impl X509ReqBuilder {
    ///
    ///[`X509_REQ_set_version`]: https://www.openssl.org/docs/man1.1.0/crypto/X509_REQ_set_version.html
    pub fn set_version(&mut self, version: i32) -> Result<(), ErrorStack> {
        unsafe { cvt(ffi::X509_REQ_set_version(self.0.as_ptr(), version.into())).map(|_| ()) }
        unsafe { cvt(ffi::X509_REQ_set_version(self.0.as_ptr(), version as c_long)).map(|_| ()) }
    }

    /// Set the issuer name.