Skip to content

Commit

Permalink
Format in a way that rustfmt 1.x and 2.0.0-rc.2 both render the same
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Oct 5, 2020
1 parent f57f756 commit 2c4b35f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/unique_ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,9 @@ unsafe impl UniquePtrTarget for CxxString {
const __NAME: &'static dyn Display = &"CxxString";
fn __null() -> *mut c_void {
let mut repr = ptr::null_mut::<c_void>();
unsafe { unique_ptr_std_string_null(&mut repr) }
unsafe {
unique_ptr_std_string_null(&mut repr);
}
repr
}
unsafe fn __raw(raw: *mut Self) -> *mut c_void {
Expand Down
2 changes: 1 addition & 1 deletion syntax/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ fn parse_struct(cx: &mut Errors, item: ItemStruct) -> Result<Api> {
Fields::Named(fields) => fields,
Fields::Unit => return Err(Error::new_spanned(item, "unit structs are not supported")),
Fields::Unnamed(_) => {
return Err(Error::new_spanned(item, "tuple structs are not supported"))
return Err(Error::new_spanned(item, "tuple structs are not supported"));
}
};

Expand Down

0 comments on commit 2c4b35f

Please sign in to comment.