8
8
9
9
use serde:: { Deserialize , Deserializer } ;
10
10
11
+ use crate :: core:: config:: Merge ;
11
12
use crate :: core:: config:: toml:: ReplaceOpt ;
12
- use crate :: core:: config:: { Merge , set} ;
13
- use crate :: { Config , HashSet , PathBuf , define_config, exit} ;
13
+ use crate :: { HashSet , PathBuf , define_config, exit} ;
14
14
15
15
define_config ! {
16
16
/// TOML representation of various global install decisions.
@@ -24,20 +24,3 @@ define_config! {
24
24
datadir: Option <String > = "datadir" ,
25
25
}
26
26
}
27
-
28
- impl Config {
29
- /// Applies installation-related configuration from the `Install` struct
30
- /// to the global `Config` structure.
31
- pub fn apply_install_config ( & mut self , toml_install : Option < Install > ) {
32
- if let Some ( install) = toml_install {
33
- let Install { prefix, sysconfdir, docdir, bindir, libdir, mandir, datadir } = install;
34
- self . prefix = prefix. map ( PathBuf :: from) ;
35
- self . sysconfdir = sysconfdir. map ( PathBuf :: from) ;
36
- self . datadir = datadir. map ( PathBuf :: from) ;
37
- self . docdir = docdir. map ( PathBuf :: from) ;
38
- set ( & mut self . bindir , bindir. map ( PathBuf :: from) ) ;
39
- self . libdir = libdir. map ( PathBuf :: from) ;
40
- self . mandir = mandir. map ( PathBuf :: from) ;
41
- }
42
- }
43
- }
0 commit comments