diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 1917114..c0a0649 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -20,17 +20,17 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - rust: ["1.64.0", stable] + rust: ["1.71.0", stable] steps: - uses: actions/checkout@v4 - uses: maxim-lobanov/setup-xcode@v1 - if: ${{ matrix.os == 'macos-latest' && matrix.rust == '1.64.0' }} + if: ${{ matrix.os == 'macos-latest' && matrix.rust == '1.71.0' }} with: xcode-version: latest-stable - uses: dtolnay/rust-toolchain@stable if: ${{ matrix.rust == 'stable' }} - - uses: dtolnay/rust-toolchain@1.64.0 - if: ${{ matrix.rust == '1.64.0' }} + - uses: dtolnay/rust-toolchain@1.71.0 + if: ${{ matrix.rust == '1.71.0' }} - name: Build run: cargo build - name: Test diff --git a/Cargo.toml b/Cargo.toml index 5e2f7c7..ad267b6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ edition = "2021" libc = "0.2" [target.'cfg(target_os = "windows")'.dependencies.windows-sys] -version = "0.59.0" +version = "0.61.2" features = [ "Win32_Foundation", "Win32_System_IO", diff --git a/src/windows.rs b/src/windows.rs index 9b8895b..b26df7d 100644 --- a/src/windows.rs +++ b/src/windows.rs @@ -64,14 +64,14 @@ impl IpAdapterAddresses { } } - pub fn prefixes(&self) -> PrefixesIterator { + pub fn prefixes(&self) -> PrefixesIterator<'_> { PrefixesIterator { _head: unsafe { &*self.0 }, next: unsafe { (*self.0).FirstPrefix }, } } - pub fn unicast_addresses(&self) -> UnicastAddressesIterator { + pub fn unicast_addresses(&self) -> UnicastAddressesIterator<'_> { UnicastAddressesIterator { _head: unsafe { &*self.0 }, next: unsafe { (*self.0).FirstUnicastAddress }, @@ -132,7 +132,7 @@ impl IfAddrs { }) } - pub fn iter(&self) -> IfAddrsIterator { + pub fn iter(&self) -> IfAddrsIterator<'_> { IfAddrsIterator { _head: self, next: self.inner.0, @@ -256,7 +256,7 @@ impl WindowsIfChangeNotifier { AF_UNSPEC, Some(if_change_callback), ret.tx as *const c_void, - 0, + false, &mut ret.handle, ) };