Skip to content

Commit e414f24

Browse files
committed
Fix fallback in rust-lang#270
Wrong order of arguments in `format!`.
1 parent 76c141b commit e414f24

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/github/nag.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,11 +1219,13 @@ impl<'a> RfcBotComment<'a> {
12191219
}
12201220

12211221
fn add_comment_url(issue: &Issue, msg: &mut String, comment_id: i32) {
1222-
let url = format!("https://github.com/{}/{}/{}#issuecomment-{}",
1223-
issue.repository,
1224-
issue.number,
1225-
if issue.is_pull_request { "pull" } else { "issues" },
1226-
comment_id);
1222+
let url = format!(
1223+
"https://github.com/{repo}/{typ}/{number}#issuecomment-{id}",
1224+
repo = issue.repository,
1225+
typ = if issue.is_pull_request { "pull" } else { "issues" },
1226+
number = issue.number,
1227+
id = comment_id,
1228+
);
12271229
msg.push_str(&url);
12281230
}
12291231

0 commit comments

Comments
 (0)