diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2c9b9401..fa9c999d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,6 +15,7 @@ jobs: - ubuntu - ubuntu-old - macos + - windows include: - build: ubuntu os: ubuntu-latest @@ -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 @@ -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 diff --git a/protobuf-native/src/compiler.rs b/protobuf-native/src/compiler.rs index c4574481..dfdc5ee3 100644 --- a/protobuf-native/src/compiler.rs +++ b/protobuf-native/src/compiler.rs @@ -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, + ); } } @@ -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); diff --git a/protobuf-native/src/internal.rs b/protobuf-native/src/internal.rs index c08077c4..126ee116 100644 --- a/protobuf-native/src/internal.rs +++ b/protobuf-native/src/internal.rs @@ -53,7 +53,7 @@ pub struct StringView { impl From for StringView where - S: AsRef<[u8]> + S: AsRef<[u8]>, { fn from(s: S) -> StringView { StringView {