Skip to content

Commit

Permalink
Let Clippy Worry about Semicolons
Browse files Browse the repository at this point in the history
  • Loading branch information
killercup committed Jul 11, 2016
1 parent 5f0234f commit 6937912
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,11 +299,6 @@ fn apply_suggestion(suggestion: &Suggestion) -> Result<(), ProgramError> {
// Insert new content! Finally!
new_content.push_str(&suggestion.replacement);

// TODO(killercup): better handling of trailing semicolons
if suggestion.text.trim().ends_with(';') && !suggestion.replacement.trim().ends_with(';') {
new_content.push_str(";");
}

// Parts of line after replacement
new_content.push_str(&file_content.lines()
.nth(suggestion.line_range.end.line - 1)
Expand Down

0 comments on commit 6937912

Please sign in to comment.