From 8023f4d074c1fcb68f009f49091fb3d76aabf5b2 Mon Sep 17 00:00:00 2001 From: Nghia Date: Sun, 15 Sep 2024 12:33:09 +0000 Subject: [PATCH] fix use unix path inside typed window pathbuf (#30) --- 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.