Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nicholas Bailey
rust-gitlab
Commits
c44179a3
Commit
c44179a3
authored
Oct 10, 2019
by
Ben Boeckel
⛰
Browse files
clippy: avoid using Option::map for unit function calls
parent
74a8daf7
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/gitlab.rs
View file @
c44179a3
...
...
@@ -686,10 +686,18 @@ impl Gitlab {
let
mut
params
=
vec!
[(
"state"
,
state
.as_str
())];
info
.refname
.map
(|
v
|
params
.push
((
"ref"
,
v
)));
info
.name
.map
(|
v
|
params
.push
((
"name"
,
v
)));
info
.target_url
.map
(|
v
|
params
.push
((
"target_url"
,
v
)));
info
.description
.map
(|
v
|
params
.push
((
"description"
,
v
)));
if
let
Some
(
v
)
=
info
.refname
{
params
.push
((
"ref"
,
v
))
}
if
let
Some
(
v
)
=
info
.name
{
params
.push
((
"name"
,
v
))
}
if
let
Some
(
v
)
=
info
.target_url
{
params
.push
((
"target_url"
,
v
))
}
if
let
Some
(
v
)
=
info
.description
{
params
.push
((
"description"
,
v
))
}
self
.post_with_param
(
&
path
,
&
params
)
}
...
...
@@ -714,10 +722,18 @@ impl Gitlab {
let
mut
params
=
vec!
[(
"state"
,
state
.as_str
())];
info
.refname
.map
(|
v
|
params
.push
((
"ref"
,
v
)));
info
.name
.map
(|
v
|
params
.push
((
"name"
,
v
)));
info
.target_url
.map
(|
v
|
params
.push
((
"target_url"
,
v
)));
info
.description
.map
(|
v
|
params
.push
((
"description"
,
v
)));
if
let
Some
(
v
)
=
info
.refname
{
params
.push
((
"ref"
,
v
))
}
if
let
Some
(
v
)
=
info
.name
{
params
.push
((
"name"
,
v
))
}
if
let
Some
(
v
)
=
info
.target_url
{
params
.push
((
"target_url"
,
v
))
}
if
let
Some
(
v
)
=
info
.description
{
params
.push
((
"description"
,
v
))
}
self
.post_with_param
(
&
path
,
&
params
)
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment