Deployment and lifecycle management for Nix
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore(client): address clippy suggestions

+7 -7
+5 -5
client/src/main.rs
··· 123 123 } 124 124 125 125 pub fn bootstrap_token_file(self, bootstrap_token_file: Option<PathBuf>) -> Self { 126 - if let Some(_) = &bootstrap_token_file { 126 + if bootstrap_token_file.is_some() { 127 127 Self { 128 128 bootstrap_token_file, 129 129 ..self ··· 134 134 } 135 135 136 136 pub fn name(self, name: Option<String>) -> Self { 137 - if let Some(_) = &name { 137 + if name.is_some() { 138 138 Self { name, ..self } 139 139 } else { 140 140 self ··· 142 142 } 143 143 144 144 pub fn reboot(self, reboot: Option<bool>) -> Self { 145 - if let Some(_) = &reboot { 145 + if reboot.is_some() { 146 146 Self { reboot, ..self } 147 147 } else { 148 148 self ··· 150 150 } 151 151 152 152 pub fn seed_type(self, seed_type: Option<SeedType>) -> Self { 153 - if let Some(_) = &seed_type { 153 + if seed_type.is_some() { 154 154 Self { seed_type, ..self } 155 155 } else { 156 156 self ··· 158 158 } 159 159 160 160 pub fn url(self, url: Option<String>) -> Self { 161 - if let Some(_) = &url { 161 + if url.is_some() { 162 162 Self { url, ..self } 163 163 } else { 164 164 self
+2 -2
client/src/sower.rs
··· 201 201 SeedType::HomeManager => env::var("USER").expect("can not detect username"), 202 202 }); 203 203 let seed_type = config.seed_type.unwrap(); 204 - let sower = Sower::new(&config)?; 204 + let sower = Sower::new(config)?; 205 205 206 206 let mut tree = Tree { 207 207 name: name.clone(), ··· 310 310 let current = fs::canonicalize(current_path).expect("unable to read current link"); 311 311 let booted = fs::canonicalize(booted_path).expect("unable to read booted link"); 312 312 313 - if path != "" { 313 + if !path.is_empty() { 314 314 if current != booted { 315 315 info!( 316 316 "current {:?} != booted {:?}",