File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -11,20 +11,11 @@ pub(crate) struct Dirs {
1111
1212#[ doc( hidden) ]
1313#[ derive( Debug , Copy , Clone ) ]
14- pub ( crate ) enum PathBase {
14+ enum PathBase {
1515 Source ,
1616 Build ,
1717}
1818
19- impl PathBase {
20- fn to_path ( self , dirs : & Dirs ) -> PathBuf {
21- match self {
22- PathBase :: Source => dirs. source_dir . clone ( ) ,
23- PathBase :: Build => dirs. build_dir . clone ( ) ,
24- }
25- }
26- }
27-
2819#[ derive( Debug , Copy , Clone ) ]
2920pub ( crate ) struct RelPath {
3021 base : PathBase ,
@@ -41,6 +32,9 @@ impl RelPath {
4132 }
4233
4334 pub ( crate ) fn to_path ( & self , dirs : & Dirs ) -> PathBuf {
44- self . base . to_path ( dirs) . join ( self . suffix )
35+ match self . base {
36+ PathBase :: Source => dirs. source_dir . join ( self . suffix ) ,
37+ PathBase :: Build => dirs. build_dir . join ( self . suffix ) ,
38+ }
4539 }
4640}
You can’t perform that action at this time.
0 commit comments