Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
- ubuntu
- ubuntu-old
- macos
- windows
include:
- build: ubuntu
os: ubuntu-latest
Expand All @@ -25,8 +26,11 @@ jobs:
- build: macos
os: macos-latest
rust: stable
- build: windows
os: windows
rust: stable
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Install Rust (rustup)
run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }}
- run: cargo test
Expand All @@ -35,7 +39,7 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Rust
Expand Down
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