Skip to content

Commit d49c897

Browse files
committed
Avoid temporary path allocation
1 parent bc902a9 commit d49c897

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/types.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use std::fs::File;
2-
use std::path::{Path, PathBuf};
2+
use std::path::Path;
33
use std::str::FromStr;
44
use std::sync::Arc;
55
use std::time::Duration;
@@ -243,7 +243,7 @@ impl ApplicationCredentials {
243243
?path,
244244
"reading credentials file from GOOGLE_APPLICATION_CREDENTIALS env var"
245245
);
246-
Self::from_file(PathBuf::from(path))
246+
Self::from_file(&path)
247247
})
248248
.transpose()
249249
}

0 commit comments

Comments
 (0)