Verified Commit 11091ee1 authored by Jelle van der Waa's avatar Jelle van der Waa 🚧
Browse files

chore: fix needless borrows found by clippy

parent 6f38fbfb
Pipeline #15139 passed with stage
in 18 seconds
...@@ -142,7 +142,7 @@ impl GitLabGlue { ...@@ -142,7 +142,7 @@ impl GitLabGlue {
let mut summary = PlanSummary::new(&label); let mut summary = PlanSummary::new(&label);
let members = self.get_group_members(&group.full_path).await?; let members = self.get_group_members(&group.full_path).await?;
for member in &members { for member in &members {
if is_archlinux_bot(&member) { if is_archlinux_bot(member) {
continue; continue;
} }
...@@ -199,7 +199,7 @@ impl GitLabGlue { ...@@ -199,7 +199,7 @@ impl GitLabGlue {
.await?; .await?;
for member in &members { for member in &members {
if is_archlinux_bot(&member) { if is_archlinux_bot(member) {
continue; continue;
} }
...@@ -258,7 +258,7 @@ impl GitLabGlue { ...@@ -258,7 +258,7 @@ impl GitLabGlue {
for staff in state.staff() { for staff in state.staff() {
if !gitlab_group_member_names.contains(&staff.username) if !gitlab_group_member_names.contains(&staff.username)
&& self && self
.add_group_member(action, &staff, group, DEFAULT_ARCH_LINUX_GROUP_ACCESS_LEVEL) .add_group_member(action, staff, group, DEFAULT_ARCH_LINUX_GROUP_ACCESS_LEVEL)
.await? .await?
{ {
summary.add += 1; summary.add += 1;
...@@ -266,7 +266,7 @@ impl GitLabGlue { ...@@ -266,7 +266,7 @@ impl GitLabGlue {
} }
for member in &archlinux_group_members { for member in &archlinux_group_members {
if is_archlinux_bot(&member) { if is_archlinux_bot(member) {
continue; continue;
} }
match state.staff_from_gitlab_id(member.id) { match state.staff_from_gitlab_id(member.id) {
...@@ -316,7 +316,7 @@ impl GitLabGlue { ...@@ -316,7 +316,7 @@ impl GitLabGlue {
for staff in state.staff() { for staff in state.staff() {
if !gitlab_group_member_names.contains(&staff.username) if !gitlab_group_member_names.contains(&staff.username)
&& self && self
.add_group_member(action, &staff, group, DEFAULT_STAFF_GROUP_ACCESS_LEVEL) .add_group_member(action, staff, group, DEFAULT_STAFF_GROUP_ACCESS_LEVEL)
.await? .await?
{ {
summary.add += 1; summary.add += 1;
...@@ -324,7 +324,7 @@ impl GitLabGlue { ...@@ -324,7 +324,7 @@ impl GitLabGlue {
} }
for member in &archlinux_group_members { for member in &archlinux_group_members {
if is_archlinux_bot(&member) { if is_archlinux_bot(member) {
continue; continue;
} }
match state.staff_from_gitlab_id(member.id) { match state.staff_from_gitlab_id(member.id) {
...@@ -375,7 +375,7 @@ impl GitLabGlue { ...@@ -375,7 +375,7 @@ impl GitLabGlue {
&& self && self
.add_group_member( .add_group_member(
action, action,
&staff, staff,
devops_group, devops_group,
DEVOPS_INFRASTRUCTURE_ACCESS_LEVEL, DEVOPS_INFRASTRUCTURE_ACCESS_LEVEL,
) )
...@@ -386,7 +386,7 @@ impl GitLabGlue { ...@@ -386,7 +386,7 @@ impl GitLabGlue {
} }
for member in &group_members { for member in &group_members {
if is_archlinux_bot(&member) { if is_archlinux_bot(member) {
continue; continue;
} }
match state.devops_from_gitlab_id(member.id) { match state.devops_from_gitlab_id(member.id) {
...@@ -511,7 +511,7 @@ impl GitLabGlue { ...@@ -511,7 +511,7 @@ impl GitLabGlue {
debug!("Adding user {} to GitLab group '{}'", user.username, group); debug!("Adding user {} to GitLab group '{}'", user.username, group);
util::print_diff( util::print_diff(
&"", "",
util::format_gitlab_member_access(group, &user.username, access_level).as_str(), util::format_gitlab_member_access(group, &user.username, access_level).as_str(),
)?; )?;
match action { match action {
...@@ -547,7 +547,7 @@ impl GitLabGlue { ...@@ -547,7 +547,7 @@ impl GitLabGlue {
util::access_level_from_u64(member.access_level), util::access_level_from_u64(member.access_level),
) )
.as_str(), .as_str(),
&"", "",
)?; )?;
match action { match action {
Action::Apply => { Action::Apply => {
...@@ -663,7 +663,7 @@ impl GitLabGlue { ...@@ -663,7 +663,7 @@ impl GitLabGlue {
user.username, project user.username, project
); );
util::print_diff( util::print_diff(
&"", "",
util::format_gitlab_member_access(project, &user.username, access_level).as_str(), util::format_gitlab_member_access(project, &user.username, access_level).as_str(),
)?; )?;
match action { match action {
...@@ -701,7 +701,7 @@ impl GitLabGlue { ...@@ -701,7 +701,7 @@ impl GitLabGlue {
util::access_level_from_u64(member.access_level), util::access_level_from_u64(member.access_level),
) )
.as_str(), .as_str(),
&"", "",
)?; )?;
match action { match action {
Action::Apply => { Action::Apply => {
......
Supports Markdown
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