Commit 74a8daf7 authored by Ben Boeckel's avatar Ben Boeckel
Browse files

clippy: use simplified struct initialization

parent 3a55a767
......@@ -161,8 +161,8 @@ impl Gitlab {
let api = Gitlab {
client: Client::new(),
base_url: base_url,
token: token,
base_url,
token,
};
// Ensure the API is working.
......@@ -1011,8 +1011,8 @@ impl Gitlab {
self.post_with_param(
&format!("projects/{}/pipeline", project),
CreatePipelineParams {
ref_: ref_,
variables: variables,
ref_,
variables,
},
)
}
......
......@@ -1221,7 +1221,7 @@ impl Milestone {
iid: MilestoneInternalId::new(0),
project_id: Some(project_id),
group_id: None,
title: title,
title,
description: None,
state: MilestoneState::Active,
created_at: DateTime::from(Utc::now()),
......@@ -1325,8 +1325,8 @@ impl Label {
pub fn new(name: String, color: LabelColor) -> Label {
Label {
id: LabelId::new(0),
name: name,
color: color,
name,
color,
description: None,
open_issues_count: None,
closed_issues_count: None,
......@@ -1465,8 +1465,8 @@ impl Issue {
Issue {
id: IssueId::new(0),
iid: IssueInternalId::new(0),
project_id: project_id,
title: title,
project_id,
title,
description: None,
state: IssueState::Opened,
created_at: DateTime::from(Utc::now()),
......@@ -1475,7 +1475,7 @@ impl Issue {
closed_by: None,
labels: Vec::new(),
milestone: None,
author: author,
author,
assignee: None,
assignees: None,
subscribed: None,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment