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 {
11
11
12
12
#[ doc( hidden) ]
13
13
#[ derive( Debug , Copy , Clone ) ]
14
- pub ( crate ) enum PathBase {
14
+ enum PathBase {
15
15
Source ,
16
16
Build ,
17
17
}
18
18
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
-
28
19
#[ derive( Debug , Copy , Clone ) ]
29
20
pub ( crate ) struct RelPath {
30
21
base : PathBase ,
@@ -41,6 +32,9 @@ impl RelPath {
41
32
}
42
33
43
34
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
+ }
45
39
}
46
40
}
You can’t perform that action at this time.
0 commit comments