Skip to content

Commit 2646328

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 f03cc37 commit 2646328

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/utils/vcs.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1558,13 +1558,13 @@ mod tests {
15581558
// Test valid SHA extraction
15591559
assert_eq!(
15601560
extract_sha_from_line(" \"sha\": \"abc123def456\","),
1561-
Some("abc123def456".to_string())
1561+
Some("abc123def456".to_owned())
15621562
);
15631563

15641564
// Test with different spacing
15651565
assert_eq!(
15661566
extract_sha_from_line("\"sha\":\"def789ghi012\""),
1567-
Some("def789ghi012".to_string())
1567+
Some("def789ghi012".to_owned())
15681568
);
15691569

15701570
// Test line without SHA
@@ -1598,7 +1598,7 @@ mod tests {
15981598

15991599
assert_eq!(
16001600
extract_pr_head_sha_from_event(pr_json),
1601-
Some("abc123def456789".to_string())
1601+
Some("abc123def456789".to_owned())
16021602
);
16031603

16041604
// Test non-PR event

0 commit comments

Comments
 (0)