Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
Signed-off-by: Petros Angelatos <[email protected]>
  • Loading branch information
petrosagg authored and benesch committed May 23, 2024
1 parent 4256584 commit 7414430
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions protobuf-native/src/compiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,11 @@ pub(crate) mod ffi {
type DiskSourceTree;
fn NewDiskSourceTree() -> *mut DiskSourceTree;
unsafe fn DeleteDiskSourceTree(tree: *mut DiskSourceTree);
fn MapPath(self: Pin<&mut DiskSourceTree>, virtual_path: string_view, disk_path: string_view);
fn MapPath(
self: Pin<&mut DiskSourceTree>,
virtual_path: string_view,
disk_path: string_view,
);
}
}

Expand Down Expand Up @@ -444,7 +448,8 @@ impl DiskSourceTree {
pub fn map_path(self: Pin<&mut Self>, virtual_path: &Path, disk_path: &Path) {
let virtual_path = ProtobufPath::from(virtual_path);
let disk_path = ProtobufPath::from(disk_path);
self.as_ffi_mut().MapPath(virtual_path.into(), disk_path.into())
self.as_ffi_mut()
.MapPath(virtual_path.into(), disk_path.into())
}

unsafe_ffi_conversions!(ffi::DiskSourceTree);
Expand Down
2 changes: 1 addition & 1 deletion protobuf-native/src/internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pub struct StringView {

impl<S> From<S> for StringView
where
S: AsRef<[u8]>
S: AsRef<[u8]>,
{
fn from(s: S) -> StringView {
StringView {
Expand Down

0 comments on commit 7414430

Please sign in to comment.