From b4ee9839c234ac762a59640e4eba9841446c6954 Mon Sep 17 00:00:00 2001 From: Vo Van Nghia Date: Sun, 15 Sep 2024 10:06:53 +0200 Subject: [PATCH] fix use unix path inside typed window pathbuf --- src/typed/non_utf8/pathbuf.rs | 2 +- src/typed/utf8/pathbuf.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/typed/non_utf8/pathbuf.rs b/src/typed/non_utf8/pathbuf.rs index 8c461e8..9e6126c 100644 --- a/src/typed/non_utf8/pathbuf.rs +++ b/src/typed/non_utf8/pathbuf.rs @@ -92,7 +92,7 @@ impl TypedPathBuf { /// Allocates an empty [`TypedPathBuf`] as a Windows path. #[inline] pub fn windows() -> Self { - Self::Unix(UnixPathBuf::new()) + Self::Windows(WindowsPathBuf::new()) } /// Creates a new [`TypedPathBuf`] from the bytes representing a Unix path. diff --git a/src/typed/utf8/pathbuf.rs b/src/typed/utf8/pathbuf.rs index 13025c8..ed3e0a1 100644 --- a/src/typed/utf8/pathbuf.rs +++ b/src/typed/utf8/pathbuf.rs @@ -95,7 +95,7 @@ impl Utf8TypedPathBuf { /// Allocates an empty [`Utf8TypedPathBuf`] as a Windows path. #[inline] pub fn windows() -> Self { - Self::Unix(Utf8UnixPathBuf::new()) + Self::Windows(Utf8WindowsPathBuf::new()) } /// Creates a new [`Utf8TypedPathBuf`] from the bytes representing a Unix path.