Skip to content

Commit b2fefe4

Browse files
chore: clippy fix
1 parent 3db14ba commit b2fefe4

File tree

5 files changed

+5
-9
lines changed

5 files changed

+5
-9
lines changed

src/auth/ssh_utils.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,10 @@ pub fn parse_ssh_agent_output(output: &str) -> HashMap<String, String> {
1313

1414
for line in output.lines() {
1515
if line.contains('=') && (line.contains("SSH_AUTH_SOCK") || line.contains("SSH_AGENT_PID"))
16-
{
17-
if let Some(var_part) = line.split(';').next() {
18-
if let Some((key, value)) = var_part.split_once('=') {
16+
&& let Some(var_part) = line.split(';').next()
17+
&& let Some((key, value)) = var_part.split_once('=') {
1918
env_vars.insert(key.to_string(), value.to_string());
2019
}
21-
}
22-
}
2320
}
2421

2522
env_vars

src/events/git_clone.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use super::AtomicEvent;
22
use crate::auth::git_auth::setup_auth_callbacks;
3-
use crate::bgit_error::{BGitError, BGitErrorWorkflowType, NO_RULE, NO_STEP};
3+
use crate::bgit_error::BGitError;
44
use crate::rules::Rule;
55
use std::env;
66
use std::path::Path;

src/events/git_pull.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::path::Path;
22

33
use super::AtomicEvent;
44
use crate::auth::git_auth::setup_auth_callbacks;
5-
use crate::bgit_error::{BGitError, BGitErrorWorkflowType, NO_RULE, NO_STEP};
5+
use crate::bgit_error::BGitError;
66
use crate::rules::Rule;
77
use git2::Repository;
88

src/events/git_push.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use super::AtomicEvent;
22
use crate::auth::git_auth::setup_auth_callbacks;
3-
use crate::bgit_error::{BGitError, BGitErrorWorkflowType, NO_RULE, NO_STEP};
3+
use crate::bgit_error::BGitError;
44
use crate::rules::Rule;
55
use git2::Repository;
66
use log::debug;

src/workflows/default/prompt/pa07_ask_pull_push.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ impl PromptStep for AskPushPull {
4646
})?;
4747

4848
match selection {
49-
0 => Ok(Step::Task(PromptStepTask(Box::new(PullAndPush::new())))),
5049
0 => Ok(Step::Task(PromptStepTask(Box::new(PullAndPush::new())))),
5150
1 => Ok(Step::Stop),
5251
_ => Err(Box::new(BGitError::new(

0 commit comments

Comments
 (0)