Skip to content

Commit 615583d

Browse files
committed
Fix typos
1 parent 79c4439 commit 615583d

2 files changed

Lines changed: 3 additions & 7 deletions

File tree

crates/stdlib/src/faulthandler.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,7 @@ mod decl {
124124

125125
#[cfg(any(unix, windows))]
126126
fn puts_bytes(fd: i32, s: &[u8]) {
127-
let _ = cfg_select! {
128-
windows => unsafe { libc::write(fd, s.as_ptr() as *const libc::c_void, s.len() as u32) },
129-
_ => unsafe { libc::write(fd, s.as_ptr() as *const libc::c_void, s.len()) },
130-
};
127+
let _ = unsafe { libc::write(fd, s.as_ptr().cast::<libc::c_void>(), s.len() as _) };
131128
}
132129

133130
// _Py_DumpHexadecimal (traceback.c)
@@ -164,7 +161,7 @@ mod decl {
164161
v /= 10;
165162
}
166163

167-
puts_bytes(fd, &buf[..buf.len() - i]);
164+
puts_bytes(fd, &buf[i..]);
168165
}
169166

170167
/// Get current thread ID

crates/stdlib/src/openssl.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1308,7 +1308,7 @@ mod _ssl {
13081308
fn num_tickets(&self, _vm: &VirtualMachine) -> PyResult<usize> {
13091309
// Only supported for TLS 1.3
13101310
cfg_select! {
1311-
ossl110 => {
1311+
ossl111 => {
13121312
let ctx = self.ctx();
13131313
let num = unsafe { sys::SSL_CTX_get_num_tickets(ctx.as_ptr()) };
13141314
Ok(num)
@@ -1562,7 +1562,6 @@ mod _ssl {
15621562
) -> PyResult<Vec<PyObjectRef>> {
15631563
let binary_form = args.binary_form.unwrap_or(false);
15641564
let ctx = self.ctx();
1565-
#[cfg(ossl300)]
15661565
let certs = cfg_select! {
15671566
ossl300 => ctx.cert_store().all_certificates(),
15681567
_ => ctx.cert_store().objects().iter().filter_map(|x| x.x509()),

0 commit comments

Comments
 (0)