Skip to content

Commit eb2d753

Browse files
authored
style: Push single character instead of string (#87)
This solves clippy warnings like this: ``` error: calling `push_str()` using a single-character string literal --> src/common.rs:222:13 | 222 | result.push_str("\n"); | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('\n')` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str = note: `-D clippy::single-char-add-str` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::single_char_add_str)]` ```
1 parent c933ace commit eb2d753

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/common.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ fn unquote_block_string(src: &str) -> Result<String, Error<Token<'_>, Token<'_>>
219219
result.push_str(&line);
220220

221221
for line in lines {
222-
result.push_str("\n");
222+
result.push('\n');
223223
result.push_str(&line);
224224
}
225225
}

0 commit comments

Comments
 (0)