Skip to content

Commit db3af3b

Browse files
committed
fix: resolve clippy warnings in git and clone modules
1 parent 41e6bbf commit db3af3b

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/clone.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ pub fn run(args: CloneArgs) -> Result<()> {
5151
} else {
5252
repository
5353
.split('/')
54-
.last()
54+
.next_back()
5555
.unwrap_or(repository)
5656
.trim_end_matches(".git")
5757
.to_string()

src/git.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use std::process::Command;
55
/// Check if directory is a valid git repository.
66
pub fn is_git_repo() -> bool {
77
Command::new("git")
8-
.args(&["rev-parse", "--is-inside-work-tree"])
8+
.args(["rev-parse", "--is-inside-work-tree"])
99
.output()
1010
.map(|o| o.status.success())
1111
.unwrap_or(false)

0 commit comments

Comments
 (0)