Skip to content

Commit 886e3e5

Browse files
committed
chore: fmt
1 parent c34b4b8 commit 886e3e5

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

crates/hstr/src/wtf8/not_quite_std.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,7 @@ pub fn push_code_point(string: &mut Wtf8Buf, code_point: CodePoint) {
139139
unsafe {
140140
// Attempt to not use an intermediate buffer by just pushing bytes
141141
// directly onto this string.
142-
let slice =
143-
slice::from_raw_parts_mut(string.bytes.as_mut_ptr().add(cur_len), 4);
142+
let slice = slice::from_raw_parts_mut(string.bytes.as_mut_ptr().add(cur_len), 4);
144143
let used = encode_utf8_raw(code_point.to_u32(), slice).unwrap_or(0);
145144
string.bytes.set_len(cur_len + used);
146145
}
@@ -171,9 +170,7 @@ pub unsafe fn slice_unchecked(s: &Wtf8, begin: usize, end: usize) -> &Wtf8 {
171170
#[inline(never)]
172171
pub fn slice_error_fail(s: &Wtf8, begin: usize, end: usize) -> ! {
173172
assert!(begin <= end);
174-
panic!(
175-
"index {begin} and/or {end} in {s:?} do not lie on character boundary"
176-
);
173+
panic!("index {begin} and/or {end} in {s:?} do not lie on character boundary");
177174
}
178175

179176
/// Copied from core::str::Utf16CodeUnits::next

0 commit comments

Comments
 (0)