Skip to content

Commit 32cca7b

Browse files
dpaoliellotesuji
authored andcommitted
Bump windows-sys to 0.60
1 parent 410a30e commit 32cca7b

File tree

4 files changed

+95
-135
lines changed

4 files changed

+95
-135
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ jobs:
8181
runs-on: windows-latest
8282
# needs: [build]
8383
env:
84-
# assert! in consts
85-
MSRV: 1.57.0
84+
# windows-sys MSRV
85+
MSRV: 1.60.0
8686
steps:
8787
- uses: actions/checkout@v4
8888
- run: |

Cargo.lock

Lines changed: 85 additions & 121 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[package]
22
name = "junction"
3-
version = "1.2.0" # Also update `html_root_url` in lib.rs
3+
version = "1.3.0" # Also update `html_root_url` in lib.rs
44
authors = ["Lzu Tao <taolzu@gmail.com>"]
55
categories = ["api-bindings", "os::windows-apis"]
66
edition = "2021"
7-
rust-version = "1.57"
7+
rust-version = "1.60"
88
exclude = [
99
"/.github",
1010
"/HOW-TO-RELEASE.md",
@@ -43,7 +43,7 @@ version = "1"
4343
default-features = false
4444

4545
[target.'cfg(windows)'.dependencies.windows-sys]
46-
version = "0.52"
46+
version = "0.60"
4747
default-features = false
4848
features = [
4949
"Win32_System_Ioctl",
@@ -56,8 +56,4 @@ features = [
5656
]
5757

5858
[dev-dependencies]
59-
tempfile = "=3.8.0"
60-
# NOTE: rustix is used by tempfile, to force tempfile use an old version
61-
# of it that is compatible with MSRV.
62-
# MSRV: v0.38.9+ has newer dep:core syntax that old rustc (<1.60) confuses.
63-
rustix = "=0.38.9"
59+
tempfile = "3.21.0"

src/internals.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ pub fn create(target: &Path, junction: &Path) -> io::Result<()> {
7878
size.wrapping_add(c::REPARSE_DATA_BUFFER_HEADER_SIZE)
7979
};
8080

81-
helpers::set_reparse_point(file.as_raw_handle() as isize, rdb, u32::from(in_buffer_size))
81+
helpers::set_reparse_point(file.as_raw_handle(), rdb, u32::from(in_buffer_size))
8282
}
8383

8484
pub fn delete(junction: &Path) -> io::Result<()> {
8585
let file = helpers::open_reparse_point(junction, true)?;
86-
helpers::delete_reparse_point(file.as_raw_handle() as isize)
86+
helpers::delete_reparse_point(file.as_raw_handle())
8787
}
8888

8989
pub fn exists(junction: &Path) -> io::Result<bool> {
@@ -95,7 +95,7 @@ pub fn exists(junction: &Path) -> io::Result<bool> {
9595
let mut data = BytesAsReparseDataBuffer::new();
9696
// XXX: Could also use FindFirstFile to read the reparse point type
9797
// Ref https://learn.microsoft.com/en-us/windows/win32/fileio/reparse-point-tags
98-
helpers::get_reparse_data_point(file.as_raw_handle() as isize, data.as_mut_ptr())?;
98+
helpers::get_reparse_data_point(file.as_raw_handle(), data.as_mut_ptr())?;
9999
// SATETY: rdb should be initialized now
100100
let rdb = unsafe { data.assume_init() };
101101
// The reparse tag indicates if this is a junction or not
@@ -109,7 +109,7 @@ pub fn get_target(junction: &Path) -> io::Result<PathBuf> {
109109
}
110110
let file = helpers::open_reparse_point(junction, false)?;
111111
let mut data = BytesAsReparseDataBuffer::new();
112-
helpers::get_reparse_data_point(file.as_raw_handle() as isize, data.as_mut_ptr())?;
112+
helpers::get_reparse_data_point(file.as_raw_handle(), data.as_mut_ptr())?;
113113
// SAFETY: rdb should be initialized now
114114
let rdb = unsafe { data.assume_init() };
115115
if rdb.ReparseTag == c::IO_REPARSE_TAG_MOUNT_POINT {

0 commit comments

Comments
 (0)