-
Notifications
You must be signed in to change notification settings - Fork 97
Run Clippy #2181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Run Clippy #2181
Changes from 1 commit
daa1e8d
f82b3c2
deb5439
5b2c130
8a7c9f7
b094757
659d85e
8df056e
52d5270
258e3b7
60602d0
88731ed
82259d8
ef55ea7
69cb114
8760f36
32ea017
778ba02
031aa5d
554289e
d978fc5
d15c931
b331922
38ba2dd
c27e100
9989a85
93a80e0
1da5e71
e2903b5
01d4d27
867b95f
d92c33d
7d729ff
8372962
efdd2a8
f846986
6ba8cc3
5ed9adf
41bde06
bc1d4ab
ea0801a
05ecbd4
2d19376
4ea6b20
42e4037
8018914
93ad1fa
5930e34
3a1133f
929f3d4
cee3a6a
284ba8c
ac4d7df
b722c5f
4382423
7443c6c
8031a82
9b541d0
45d88f8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,15 +3,15 @@ use serde::{Deserialize, Serialize}; | |
use std::collections::HashMap; | ||
|
||
#[derive(Serialize, Deserialize, Debug, Clone)] | ||
pub struct FCP { | ||
pub struct Fcp { | ||
pub id: u32, | ||
pub fk_issue: u32, | ||
pub fk_initiator: u32, | ||
pub fk_initiating_comment: u64, | ||
pub disposition: Option<String>, | ||
pub fk_bot_tracking_comment: u64, | ||
pub fcp_start: Option<String>, | ||
pub fcp_closed: bool, | ||
pub start: Option<String>, | ||
pub closed: bool, | ||
Comment on lines
-13
to
+14
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Those field name changes needs to be reverted, the are coming from a API, they need to stay the same as the api. |
||
} | ||
#[derive(Serialize, Deserialize, Debug, Clone)] | ||
pub struct Reviewer { | ||
|
@@ -30,7 +30,7 @@ pub struct Concern { | |
pub reviewer: Reviewer, | ||
} | ||
#[derive(Serialize, Deserialize, Debug, Clone)] | ||
pub struct FCPIssue { | ||
pub struct FcpIssue { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here. |
||
pub id: u32, | ||
pub number: u32, | ||
pub fk_milestone: Option<u32>, | ||
|
@@ -60,18 +60,18 @@ pub struct StatusComment { | |
} | ||
|
||
#[derive(Serialize, Deserialize, Debug, Clone)] | ||
pub struct FullFCP { | ||
pub fcp: FCP, | ||
pub struct FullFcp { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And here. |
||
pub fcp: Fcp, | ||
pub reviews: Vec<Review>, | ||
pub concerns: Vec<Concern>, | ||
pub issue: FCPIssue, | ||
pub issue: FcpIssue, | ||
pub status_comment: StatusComment, | ||
} | ||
|
||
pub async fn get_all_fcps() -> anyhow::Result<HashMap<String, FullFCP>> { | ||
pub async fn get_all_fcps() -> anyhow::Result<HashMap<String, FullFcp>> { | ||
let url = Url::parse("https://rfcbot.rs/api/all")?; | ||
let res = reqwest::get(url).await?.json::<Vec<FullFCP>>().await?; | ||
let mut map: HashMap<String, FullFCP> = HashMap::new(); | ||
let res = reqwest::get(url).await?.json::<Vec<FullFcp>>().await?; | ||
let mut map: HashMap<String, FullFcp> = HashMap::new(); | ||
for full_fcp in res { | ||
map.insert( | ||
format!( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FCP
is the correct name, it stands for Final Comment Period, it should not be lower-cased.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm aware^^ This is from
clippy::upper_case_acronyms
, which specifically targets acronyms