Skip to content

Commit 7cafab4

Browse files
committed
cargo fmt
1 parent 95ca4a8 commit 7cafab4

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

src/types/cstring16.rs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
use super::chars::{Char16, NUL_16};
22
use crate::polyfill::vec_into_raw_parts;
3+
use crate::types::unaligned_slice::UnalignedSlice;
4+
use crate::types::{CStr16, EqStrUntilNul, FromSliceWithNulError};
35
use alloc::borrow::{Borrow, ToOwned};
46
use alloc::string::String;
57
use alloc::vec;
68
use alloc::vec::Vec;
79
use core::fmt::{self, Display, Formatter};
810
use core::ops;
9-
use crate::types::{CStr16, EqStrUntilNul, FromSliceWithNulError};
10-
use crate::types::unaligned_slice::UnalignedSlice;
1111

1212
/// Error returned by [`CString16::try_from::<&str>`].
1313
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
@@ -291,15 +291,9 @@ mod tests {
291291
/// Test `CString16 == &CStr16` and `&CStr16 == CString16`.
292292
#[test]
293293
fn test_cstring16_cstr16_eq() {
294-
assert_eq!(
295-
cstr16!("abc"),
296-
CString16::try_from("abc").unwrap()
297-
);
294+
assert_eq!(cstr16!("abc"), CString16::try_from("abc").unwrap());
298295

299-
assert_eq!(
300-
CString16::try_from("abc").unwrap(),
301-
cstr16!("abc")
302-
);
296+
assert_eq!(CString16::try_from("abc").unwrap(), cstr16!("abc"));
303297
}
304298

305299
/// Tests the trait implementation of trait [`EqStrUntilNul]` for [`CString16`].

0 commit comments

Comments
 (0)