mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-14 20:56:49 +00:00
chore: Reformat with latest nightly
This commit is contained in:
113 files changed
+981
-831
No files matched your search
@@ -27,8 +27,8 @@ impl fmt::Display for Escape<'_> {
|
||||
fmt.write_str(&pile_o_bits[last..i])?;
|
||||
fmt.write_str(s)?;
|
||||
|
||||
// NOTE: we only expect single byte characters here - which is fine as long as
|
||||
// we only match single byte characters
|
||||
// NOTE: we only expect single byte characters here - which is fine
|
||||
// as long as we only match single byte characters
|
||||
last = i.saturating_add(1);
|
||||
}
|
||||
|
||||
|
||||
@@ -32,8 +32,8 @@ impl<'a> From<&'a str> for &'a Unquoted {
|
||||
fn from(s: &'a str) -> &'a Unquoted {
|
||||
let s: &'a str = s.unquote_infallible();
|
||||
|
||||
//SAFETY: This is a pattern I lifted from ruma-identifiers for strong-type strs
|
||||
// by wrapping in a tuple-struct.
|
||||
//SAFETY: This is a pattern I lifted from ruma-identifiers for
|
||||
// strong-type strs by wrapping in a tuple-struct.
|
||||
#[allow(clippy::transmute_ptr_to_ptr)]
|
||||
unsafe {
|
||||
std::mem::transmute(s)
|
||||
|
||||
@@ -120,10 +120,11 @@ pub fn cores_available() -> impl Iterator<Item = Id> { from_mask(*CORES_AVAILABL
|
||||
pub fn getcpu() -> Result<usize> {
|
||||
use crate::{Error, utils::math};
|
||||
|
||||
// SAFETY: This is part of an interface with many low-level calls taking many
|
||||
// raw params, but it's unclear why this specific call is unsafe. Nevertheless
|
||||
// the value obtained here is semantically unsafe because it can change on the
|
||||
// instruction boundary trailing its own acquisition and also any other time.
|
||||
// SAFETY: This is part of an interface with many low-level calls taking
|
||||
// many raw params, but it's unclear why this specific call is unsafe.
|
||||
// Nevertheless the value obtained here is semantically unsafe because it
|
||||
// can change on the instruction boundary trailing its own acquisition and
|
||||
// also any other time.
|
||||
let ret: i32 = unsafe { libc::sched_getcpu() };
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
|
||||
Reference in new issue
Block a user