Apply fixes from Clippy

This commit is contained in:
Zhaofeng Li 2022-10-09 15:26:37 -06:00
parent 2b612e294b
commit 513ffd1f12
7 changed files with 8 additions and 10 deletions

View file

@ -55,7 +55,7 @@ pub struct JobMonitor {
} }
/// The state of a job. /// The state of a job.
#[derive(Debug, Clone, Copy, PartialEq)] #[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum JobState { pub enum JobState {
/// Waiting to begin. /// Waiting to begin.
/// ///
@ -73,7 +73,7 @@ pub enum JobState {
} }
/// The type of a job. /// The type of a job.
#[derive(Debug, Clone, Copy, PartialEq)] #[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum JobType { pub enum JobType {
/// Meta. /// Meta.
Meta, Meta,

View file

@ -1,7 +1,7 @@
//! Deployment goals. //! Deployment goals.
/// The goal of a deployment. /// The goal of a deployment.
#[derive(Debug, Copy, Clone, PartialEq)] #[derive(Debug, Copy, Clone, PartialEq, Eq)]
pub enum Goal { pub enum Goal {
/// Build the configurations only. /// Build the configurations only.
Build, Build,

View file

@ -37,7 +37,7 @@ pub struct Options {
} }
/// Which evaluator to use. /// Which evaluator to use.
#[derive(Clone, Debug, PartialEq)] #[derive(Clone, Debug, PartialEq, Eq)]
pub enum Evaluator { pub enum Evaluator {
Chunked, Chunked,
Streaming, Streaming,

View file

@ -338,7 +338,7 @@ mod tests {
Err(e) => match e { Err(e) => match e {
EvalError::Global(e) => { EvalError::Global(e) => {
let message = format!("{}", e); let message = format!("{}", e);
assert!(message.find("No such file or directory").is_some()); assert!(message.contains("No such file or directory"));
} }
_ => { _ => {
panic!("Expected a global error, got {:?}", e); panic!("Expected a global error, got {:?}", e);

View file

@ -99,9 +99,7 @@ impl Host for Local {
execution.set_job(self.job.clone()); execution.set_job(self.job.clone());
let result = execution.run().await; execution.run().await
result
} }
async fn get_current_system_profile(&mut self) -> ColmenaResult<Profile> { async fn get_current_system_profile(&mut self) -> ColmenaResult<Profile> {

View file

@ -67,7 +67,7 @@ struct KeySources {
} }
/// When to upload a given key. /// When to upload a given key.
#[derive(Debug, Copy, Clone, PartialEq, Serialize, Deserialize)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub enum UploadAt { pub enum UploadAt {
/// Before activating the system profile. /// Before activating the system profile.
#[serde(rename = "pre-activation")] #[serde(rename = "pre-activation")]

View file

@ -80,7 +80,7 @@ pub struct Line {
} }
/// Style of a line. /// Style of a line.
#[derive(Debug, Clone, Copy, PartialEq)] #[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum LineStyle { pub enum LineStyle {
Normal, Normal,
Success, Success,