cargo clippy fix

This commit is contained in:
rmanach
2023-04-22 15:29:55 +02:00
parent 0f5f8a3ec0
commit b82d968e49
3 changed files with 15 additions and 18 deletions
+6 -6
View File
@@ -22,8 +22,8 @@ pub struct Job {
impl Job {
pub fn new(id: i32, action: JobAction) -> Self {
Self {
id: id,
action: action,
id,
action,
status: RunnerStatus::Pending,
}
}
@@ -34,13 +34,13 @@ impl Job {
fn deploy(&mut self) -> Result<Message, RunnerError> {
self.set_status(RunnerStatus::Running);
println!("{} {}", self.format_job(), "deploying...");
println!("{} deploying...", self.format_job());
let wait = time::Duration::from_secs(5);
thread::sleep(wait);
self.set_status(RunnerStatus::Success);
println!("{} {}", self.format_job(), "deploy done");
println!("{} deploy done", self.format_job());
Ok(Message::new(
self.id.try_into().unwrap(),
@@ -50,13 +50,13 @@ impl Job {
fn check(&mut self) -> Result<Message, RunnerError> {
self.set_status(RunnerStatus::Running);
println!("{} {}", self.format_job(), "checking...");
println!("{} checking...", self.format_job());
let wait = time::Duration::from_millis(50);
thread::sleep(wait);
self.set_status(RunnerStatus::Success);
println!("{} {}", self.format_job(), "checking done");
println!("{} checking done", self.format_job());
Ok(Message::empty())
}