From cd559083463ad9fbfdb04cc99fca18751eba08c1 Mon Sep 17 00:00:00 2001 From: Ryan Andersen Date: Thu, 22 Feb 2024 21:56:17 -0800 Subject: [PATCH] Avoid unnecessary heap allocation and copy --- src/file_handle/native.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/file_handle/native.rs b/src/file_handle/native.rs index 54c91c1..7e0d16a 100644 --- a/src/file_handle/native.rs +++ b/src/file_handle/native.rs @@ -183,7 +183,7 @@ impl From for FileHandle { impl From for PathBuf { fn from(file_handle: FileHandle) -> Self { - PathBuf::from(file_handle.path()) + file_handle.0 } }