forked from DGNum/colmena
General code cleanup
This commit is contained in:
parent
62cf77a8b6
commit
da7907c874
4 changed files with 4 additions and 9 deletions
|
@ -14,7 +14,7 @@ use crate::progress::SimpleProgressOutput;
|
|||
use crate::nix::{NixError, NodeFilter};
|
||||
use crate::util;
|
||||
|
||||
pub fn register_deploy_args<'a>(command: App<'a>) -> App<'a> {
|
||||
pub fn register_deploy_args(command: App) -> App {
|
||||
command
|
||||
.arg(Arg::new("eval-node-limit")
|
||||
.long("eval-node-limit")
|
||||
|
|
|
@ -382,10 +382,7 @@ impl JobMonitor {
|
|||
metadata.custom_message = message;
|
||||
}
|
||||
|
||||
let metadata = if new_state == JobState::Waiting {
|
||||
// Waiting state doesn't generate user-visible output
|
||||
metadata
|
||||
} else {
|
||||
if new_state != JobState::Waiting {
|
||||
if let Some(sender) = &self.progress {
|
||||
let text = if new_state == JobState::Succeeded {
|
||||
metadata.custom_message.clone()
|
||||
|
@ -406,8 +403,6 @@ impl JobMonitor {
|
|||
sender.send(message).unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
metadata
|
||||
};
|
||||
|
||||
self.jobs.insert(job_id, metadata);
|
||||
|
|
|
@ -100,7 +100,7 @@ impl TryFrom<BuildResult<Profile>> for Profile {
|
|||
});
|
||||
}
|
||||
|
||||
let path = paths.into_iter().next()
|
||||
let path = paths.iter().next()
|
||||
.unwrap().to_owned();
|
||||
|
||||
Ok(Self::from_store_path_unchecked(path))
|
||||
|
|
|
@ -157,7 +157,7 @@ pub async fn hive_from_args(args: &ArgMatches) -> NixResult<Hive> {
|
|||
Ok(hive)
|
||||
}
|
||||
|
||||
pub fn register_selector_args<'a>(command: App<'a>) -> App<'a> {
|
||||
pub fn register_selector_args(command: App) -> App {
|
||||
command
|
||||
.arg(Arg::new("on")
|
||||
.long("on")
|
||||
|
|
Loading…
Reference in a new issue