Skip to content

Commit 4a23e14

Browse files
PandH4ckeryouknowone
authored andcommitted
Fixed type mismatchs
1 parent a4629db commit 4a23e14

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

stdlib/src/ssl.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ mod _ssl {
121121
#[pyattr]
122122
const PROTO_MAXIMUM_SUPPORTED: i32 = ProtoVersion::MaxSupported as i32;
123123
#[pyattr]
124-
const OP_ALL: libc::c_ulong = sys::SSL_OP_ALL & !sys::SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS;
124+
const OP_ALL: libc::c_ulong = (sys::SSL_OP_ALL & !sys::SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS) as _;
125125
#[pyattr]
126126
const HAS_TLS_UNIQUE: bool = true;
127127
#[pyattr]
@@ -539,12 +539,12 @@ mod _ssl {
539539

540540
#[pygetset]
541541
fn options(&self) -> libc::c_ulong {
542-
self.ctx.read().options().bits()
542+
self.ctx.read().options().bits().try_into().unwrap()
543543
}
544544
#[pygetset(setter)]
545545
fn set_options(&self, opts: libc::c_ulong) {
546546
self.builder()
547-
.set_options(SslOptions::from_bits_truncate(opts));
547+
.set_options(SslOptions::from_bits_truncate(opts.into()));
548548
}
549549
#[pygetset]
550550
fn protocol(&self) -> i32 {

0 commit comments

Comments
 (0)