Skip to content

Commit b915b8f

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 9e35dde commit b915b8f

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
@@ -1520,13 +1520,13 @@ mod tests {
15201520
// Test valid SHA extraction
15211521
assert_eq!(
15221522
extract_sha_from_line(" \"sha\": \"abc123def456\","),
1523-
Some("abc123def456".to_string())
1523+
Some("abc123def456".to_owned())
15241524
);
15251525

15261526
// Test with different spacing
15271527
assert_eq!(
15281528
extract_sha_from_line("\"sha\":\"def789ghi012\""),
1529-
Some("def789ghi012".to_string())
1529+
Some("def789ghi012".to_owned())
15301530
);
15311531

15321532
// Test line without SHA
@@ -1560,7 +1560,7 @@ mod tests {
15601560

15611561
assert_eq!(
15621562
extract_pr_head_sha_from_event(pr_json),
1563-
Some("abc123def456789".to_string())
1563+
Some("abc123def456789".to_owned())
15641564
);
15651565

15661566
// Test non-PR event

0 commit comments

Comments
 (0)