@@ -198,7 +198,7 @@ impl Cfg {
198
198
/// exports.
199
199
pub fn to_exported ( & self , pkg : & Pkg ) -> Result < toml:: value:: Table > {
200
200
let mut map = toml:: value:: Table :: default ( ) ;
201
- let cfg = toml:: Value :: try_from ( & self ) . expect ( "Cfg -> TOML conversion" ) ;
201
+ let cfg = toml:: Value :: try_from ( self ) . expect ( "Cfg -> TOML conversion" ) ;
202
202
for ( key, path) in pkg. exports . iter ( ) {
203
203
let mut curr = & cfg;
204
204
let mut found = false ;
@@ -229,7 +229,7 @@ impl Cfg {
229
229
T2 : AsRef < Path >
230
230
{
231
231
let filename = file. as_ref ( ) ;
232
- let path = dir. as_ref ( ) . join ( & filename) ;
232
+ let path = dir. as_ref ( ) . join ( filename) ;
233
233
let mut file = match File :: open ( & path) {
234
234
Ok ( file) => file,
235
235
Err ( e) => {
@@ -429,7 +429,7 @@ impl CfgRenderer {
429
429
for template in self . 0 . get_templates ( ) . keys ( ) {
430
430
let compiled = self . 0 . render ( template, ctx) ?;
431
431
let compiled_hash = Blake2bHash :: from_bytes ( & compiled) ;
432
- let cfg_dest = render_path. as_ref ( ) . join ( & template) ;
432
+ let cfg_dest = render_path. as_ref ( ) . join ( template) ;
433
433
let file_hash = match Blake2bHash :: from_file ( & cfg_dest) {
434
434
Ok ( file_hash) => Some ( file_hash) ,
435
435
Err ( e) => {
@@ -536,7 +536,7 @@ fn set_permissions(path: &Path, user: &str, group: &str) -> hcore::error::Result
536
536
} else {
537
537
CONFIG_PERMISSIONS
538
538
} ;
539
- posix_perm:: set_permissions ( & path, permissions)
539
+ posix_perm:: set_permissions ( path, permissions)
540
540
}
541
541
542
542
#[ cfg( windows) ]
@@ -585,12 +585,12 @@ fn ensure_directory_structure(root: &Path, file: &Path, user: &str, group: &str)
585
585
// that `root` exists, so that we don't create arbitrary directory
586
586
// structures on disk
587
587
assert ! ( root. is_dir( ) ) ;
588
- assert ! ( file. starts_with( & root) ) ;
588
+ assert ! ( file. starts_with( root) ) ;
589
589
590
590
let dir = file. parent ( ) . unwrap ( ) ;
591
591
592
592
if !dir. exists ( ) {
593
- std:: fs:: create_dir_all ( & dir) ?;
593
+ std:: fs:: create_dir_all ( dir) ?;
594
594
for anc in dir. ancestors ( ) . take_while ( |& d| d != root) {
595
595
set_permissions ( anc, user, group) ?;
596
596
}
@@ -967,7 +967,7 @@ mod test {
967
967
package_name : & str ,
968
968
input_config : & str ,
969
969
expected_config_as_toml : & str ) {
970
- env:: set_var ( env_key, & input_config) ;
970
+ env:: set_var ( env_key, input_config) ;
971
971
972
972
let expected = toml_from_str ( expected_config_as_toml) ;
973
973
let result = Cfg :: load_environment ( package_name) ;
@@ -1006,7 +1006,7 @@ mod test {
1006
1006
let key = "HAB_TESTING_TRASH" ;
1007
1007
let config = "{\" port: 1234 what even is this!!!!?! =" ;
1008
1008
1009
- env:: set_var ( key, & config) ;
1009
+ env:: set_var ( key, config) ;
1010
1010
1011
1011
let result = Cfg :: load_environment ( "testing-trash" ) ;
1012
1012
0 commit comments