Skip to content

Commit 2bebf86

Browse files
runningcodeclaude
andcommitted
fix: use to_owned() instead of to_string() in test assertions
Fixes clippy str_to_string warnings in test code. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 13c9d22 commit 2bebf86

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/utils/vcs.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1479,13 +1479,13 @@ mod tests {
14791479
// Test valid SHA extraction
14801480
assert_eq!(
14811481
extract_sha_from_line(" \"sha\": \"abc123def456\","),
1482-
Some("abc123def456".to_string())
1482+
Some("abc123def456".to_owned())
14831483
);
14841484

14851485
// Test with different spacing
14861486
assert_eq!(
14871487
extract_sha_from_line("\"sha\":\"def789ghi012\""),
1488-
Some("def789ghi012".to_string())
1488+
Some("def789ghi012".to_owned())
14891489
);
14901490

14911491
// Test line without SHA
@@ -1519,7 +1519,7 @@ mod tests {
15191519

15201520
assert_eq!(
15211521
extract_pr_head_sha_from_event(pr_json),
1522-
Some("abc123def456789".to_string())
1522+
Some("abc123def456789".to_owned())
15231523
);
15241524

15251525
// Test non-PR event

0 commit comments

Comments
 (0)