Skip to content

Commit 129af5a

Browse files
committed
Fix always false branch
1 parent 0c07f9a commit 129af5a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/github/match_args.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ async fn match_pr_cmds(
485485
) -> Result<(), GitError> {
486486
match cmd {
487487
PRCommand::Open(open_cmd) => {
488-
let repository = open_cmd.repository.clone().unwrap_or_default();
488+
let repository = open_cmd.repository.clone().unwrap_or_default().trim().to_owned();
489489
let merge = open_cmd.merge;
490490
let opts = CreatePrOptions {
491491
url: repository.clone(),
@@ -514,7 +514,7 @@ async fn match_pr_cmds(
514514
// Merging is handled within the create_all_prs method. It gets complicated
515515
// managing the SHA for the latest commit across multiple repositories otherwise
516516
let _pr_hashmap = client.create_all_prs(&opts, merge_opts, repos).await?;
517-
} else if !repository.len() > 0 {
517+
} else if !repository.is_empty() {
518518
let Some((pr_number, sha)) = client.create_pr(&opts).await? else {
519519
return Ok(());
520520
};

0 commit comments

Comments
 (0)