mirror of
https://github.com/RGBCube/embd-rs
synced 2025-07-27 05:27:44 +00:00
Don't canoncicalize
This commit is contained in:
parent
58a1fa2182
commit
c8472c50dc
2 changed files with 4 additions and 14 deletions
|
@ -42,10 +42,7 @@ fn read_dir(path: &PathBuf) -> Vec<DirEntry> {
|
|||
let entry = entry.expect("Failed to read entry");
|
||||
|
||||
let filetype = entry.file_type().expect("Failed to read entry filetype");
|
||||
let path = entry
|
||||
.path()
|
||||
.canonicalize()
|
||||
.expect("Failed to get the canonical path of the DirEntry");
|
||||
let path = entry.path();
|
||||
|
||||
if filetype.is_dir() {
|
||||
let children = read_dir(&path);
|
||||
|
@ -62,9 +59,7 @@ fn read_dir(path: &PathBuf) -> Vec<DirEntry> {
|
|||
}
|
||||
|
||||
pub fn __include_dir(path: &str) -> Dir {
|
||||
let path = PathBuf::from(path)
|
||||
.canonicalize()
|
||||
.expect("Failed to get the canonical path of the DirEntry");
|
||||
let path = PathBuf::from(path);
|
||||
|
||||
let children = read_dir(&path);
|
||||
|
||||
|
|
|
@ -15,9 +15,7 @@ use syn::{
|
|||
pub fn __include_dir(tokens: pm1::TokenStream) -> pm1::TokenStream {
|
||||
let path = parse_macro_input!(tokens as LitStr).value();
|
||||
|
||||
let path = PathBuf::from(path)
|
||||
.canonicalize()
|
||||
.expect("Failed to get the canonical path of the DirEntry");
|
||||
let path = PathBuf::from(path);
|
||||
|
||||
let path_str = path
|
||||
.to_str()
|
||||
|
@ -43,10 +41,7 @@ fn read_dir(path: &PathBuf) -> Vec<TokenStream> {
|
|||
for entry in fs::read_dir(path).expect("Failed to list directory contents") {
|
||||
let entry = entry.expect("Failed to read entry");
|
||||
|
||||
let path = entry
|
||||
.path()
|
||||
.canonicalize()
|
||||
.expect("Failed to get the canonical path of the DirEntry");
|
||||
let path = entry.path();
|
||||
|
||||
let path_str = path
|
||||
.to_str()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue