cargo clippy fix
This commit is contained in:
+6
-6
@@ -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())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user