Skip to content
Prev Previous commit
Next Next commit
cargo fmt
  • Loading branch information
ShaharNaveh committed Jul 3, 2025
commit 4e91f6a036edefd285a54ffb8caf0d84236b8954
6 changes: 5 additions & 1 deletion common/src/encodings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,11 @@ struct DecodeError<'a> {

/// # Safety
/// `v[..valid_up_to]` must be valid utf8
const unsafe fn make_decode_err(v: &[u8], valid_up_to: usize, err_len: Option<usize>) -> DecodeError<'_> {
const unsafe fn make_decode_err(
v: &[u8],
valid_up_to: usize,
err_len: Option<usize>,
) -> DecodeError<'_> {
let (valid_prefix, rest) = unsafe { v.split_at_unchecked(valid_up_to) };
let valid_prefix = unsafe { core::str::from_utf8_unchecked(valid_prefix) };
DecodeError {
Expand Down
7 changes: 6 additions & 1 deletion vm/src/builtins/traceback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ impl PyPayload for PyTraceback {

#[pyclass]
impl PyTraceback {
pub const fn new(next: Option<PyRef<Self>>, frame: FrameRef, lasti: u32, lineno: LineNumber) -> Self {
pub const fn new(
next: Option<PyRef<Self>>,
frame: FrameRef,
lasti: u32,
lineno: LineNumber,
) -> Self {
PyTraceback {
next: PyMutex::new(next),
frame,
Expand Down
Loading