From 3712539fd2cd10a648f87853544dfd134448b784 Mon Sep 17 00:00:00 2001 From: Moritz Hoffmann Date: Mon, 13 May 2024 17:00:32 -0400 Subject: [PATCH 1/3] Run CI on windows Signed-off-by: Moritz Hoffmann --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2c9b9401..009d9a50 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 From 0b803601e8e9ffb8628915cdfc5532c2391b679f Mon Sep 17 00:00:00 2001 From: Moritz Hoffmann Date: Mon, 13 May 2024 17:01:59 -0400 Subject: [PATCH 2/3] Formatting Signed-off-by: Moritz Hoffmann --- protobuf-native/src/compiler.rs | 9 +++++++-- protobuf-native/src/internal.rs | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) 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 { From d424cb568bc4cf5d060d84407a83a1c5624e9b24 Mon Sep 17 00:00:00 2001 From: Moritz Hoffmann Date: Mon, 13 May 2024 17:03:33 -0400 Subject: [PATCH 3/3] Fix test Signed-off-by: Moritz Hoffmann --- .github/workflows/main.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 009d9a50..fa9c999d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,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 @@ -36,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