run 'cargo clippy --fix'
This commit is contained in:
parent
261607a76d
commit
0db5ebd427
|
@ -182,7 +182,7 @@ impl Metric {
|
|||
}
|
||||
|
||||
fn events() -> Vec<MetricType> {
|
||||
return vec![
|
||||
vec![
|
||||
Metric::ticker(
|
||||
"StatCollectorLegacyEvent",
|
||||
"Number of received legacy events",
|
||||
|
@ -346,7 +346,7 @@ fn events() -> Vec<MetricType> {
|
|||
None
|
||||
),
|
||||
*/
|
||||
];
|
||||
]
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
|
|
@ -64,14 +64,14 @@ pub fn parse_line(text: &str) -> Option<Vec<Instruction>> {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Debug)]
|
||||
#[derive(PartialEq, Eq, Debug)]
|
||||
pub enum Instruction {
|
||||
Build(Subset, Vec<String>),
|
||||
Eval,
|
||||
}
|
||||
|
||||
#[allow(clippy::upper_case_acronyms)]
|
||||
#[derive(Serialize, Deserialize, Debug, PartialEq)]
|
||||
#[derive(Serialize, Deserialize, Debug, PartialEq, Eq)]
|
||||
pub enum Subset {
|
||||
Nixpkgs,
|
||||
NixOS,
|
||||
|
|
|
@ -8,7 +8,7 @@ pub struct IssueComment {
|
|||
pub issue: Issue,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, PartialEq)]
|
||||
#[derive(Serialize, Deserialize, Debug, PartialEq, Eq)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum IssueCommentAction {
|
||||
Created,
|
||||
|
|
|
@ -21,19 +21,19 @@ pub struct BaseChange {
|
|||
pub sha: ChangeWas,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, PartialEq)]
|
||||
#[derive(Serialize, Deserialize, Debug, PartialEq, Eq)]
|
||||
pub struct ChangeWas {
|
||||
pub from: String,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, PartialEq)]
|
||||
#[derive(Serialize, Deserialize, Debug, PartialEq, Eq)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum PullRequestState {
|
||||
Open,
|
||||
Closed,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, PartialEq)]
|
||||
#[derive(Serialize, Deserialize, Debug, PartialEq, Eq)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum PullRequestAction {
|
||||
Edited,
|
||||
|
|
|
@ -2,7 +2,7 @@ use crate::message::{Pr, Repo};
|
|||
|
||||
use hubcaps::checks::Conclusion;
|
||||
|
||||
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
|
||||
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)]
|
||||
pub enum BuildStatus {
|
||||
Skipped,
|
||||
Success,
|
||||
|
|
|
@ -14,7 +14,7 @@ use std::process::{Command, Stdio};
|
|||
use tempfile::tempfile;
|
||||
|
||||
#[allow(clippy::upper_case_acronyms)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
pub enum File {
|
||||
DefaultNixpkgs,
|
||||
ReleaseNixOS,
|
||||
|
@ -95,7 +95,7 @@ impl fmt::Display for Operation {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub struct Nix {
|
||||
pub system: String,
|
||||
remote: String,
|
||||
|
@ -348,8 +348,7 @@ impl Nix {
|
|||
fn lines_from_file(file: fs::File) -> Vec<String> {
|
||||
BufReader::new(file)
|
||||
.lines()
|
||||
.filter(|line| line.is_ok())
|
||||
.map(|line| line.unwrap())
|
||||
.filter_map(|line| line.ok())
|
||||
.filter(|msg| !is_user_setting_warning(msg))
|
||||
.collect()
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ pub enum System {
|
|||
X8664Linux,
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
pub struct Stdenvs {
|
||||
nix: nix::Nix,
|
||||
co: PathBuf,
|
||||
|
|
|
@ -91,10 +91,10 @@ impl worker::SimpleWorker for EvaluationFilterWorker {
|
|||
pr: pr_msg,
|
||||
};
|
||||
|
||||
return vec![
|
||||
vec![
|
||||
worker::publish_serde_action(None, Some("mass-rebuild-check-jobs".to_owned()), &msg),
|
||||
worker::Action::Ack,
|
||||
];
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ pub struct Response {}
|
|||
|
||||
pub type Actions = Vec<Action>;
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
pub enum Action {
|
||||
Ack,
|
||||
NackRequeue,
|
||||
|
@ -14,7 +14,7 @@ pub enum Action {
|
|||
Publish(Box<QueueMsg>),
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
pub struct QueueMsg {
|
||||
pub exchange: Option<String>,
|
||||
pub routing_key: Option<String>,
|
||||
|
|
Loading…
Reference in a new issue