Skip to content

Commit ba5196d

Browse files
committed
Fixed type mismatchs
1 parent c64348c commit ba5196d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

stdlib/src/ssl.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ mod _ssl {
119119
#[pyattr]
120120
const PROTO_MAXIMUM_SUPPORTED: i32 = ProtoVersion::MaxSupported as i32;
121121
#[pyattr]
122-
const OP_ALL: libc::c_ulong = sys::SSL_OP_ALL & !sys::SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS;
122+
const OP_ALL: libc::c_ulong = (sys::SSL_OP_ALL & !sys::SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS) as u32;
123123
#[pyattr]
124124
const HAS_TLS_UNIQUE: bool = true;
125125
#[pyattr]
@@ -541,12 +541,12 @@ mod _ssl {
541541

542542
#[pygetset]
543543
fn options(&self) -> libc::c_ulong {
544-
self.ctx.read().options().bits()
544+
self.ctx.read().options().bits().try_into().unwrap()
545545
}
546546
#[pygetset(setter)]
547547
fn set_options(&self, opts: libc::c_ulong) {
548548
self.builder()
549-
.set_options(SslOptions::from_bits_truncate(opts));
549+
.set_options(SslOptions::from_bits_truncate(opts.into()));
550550
}
551551
#[pygetset]
552552
fn protocol(&self) -> i32 {

0 commit comments

Comments
 (0)