support x fmt for sub and outside of rust directories

Signed-off-by: ozkanonur <work@onurozkan.dev>
This commit is contained in:
ozkanonur 2023-02-23 21:35:41 +03:00
parent ea218392a4
commit 49516b3f57

View File

@ -218,7 +218,7 @@ pub fn format(build: &Builder<'_>, check: bool, paths: &[PathBuf]) {
WalkBuilder::new(first)
}
} else {
WalkBuilder::new(first)
WalkBuilder::new(src.join(first))
};
for path in &paths[1..] {
@ -229,7 +229,7 @@ pub fn format(build: &Builder<'_>, check: bool, paths: &[PathBuf]) {
walker.add(path);
}
} else {
walker.add(path);
walker.add(src.join(path));
}
}