Skip to content
Snippets Groups Projects
Verified Commit 27df13c7 authored by Eduardo Trujillo's avatar Eduardo Trujillo
Browse files

refactor(rundir): Improve path comparison to avoid allocations

parent 72440e87
No related branches found
No related tags found
No related merge requests found
Pipeline #223 passed
...@@ -196,7 +196,7 @@ impl RunDir { ...@@ -196,7 +196,7 @@ impl RunDir {
pathbuf.push(name); pathbuf.push(name);
if let Some(parent) = pathbuf.parent() { if let Some(parent) = pathbuf.parent() {
if PathBuf::from(parent) != PathBuf::from(&self.path) { if parent != self.path.as_path() {
return Err(RunDirError::InvalidSubDirName { return Err(RunDirError::InvalidSubDirName {
name: String::from(name), name: String::from(name),
inner_error: None, inner_error: None,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment