Skip to content

Commit 01bf047

Browse files
authored
style: Remove needless borrow (#89)
This solves clippy warnings like this: ``` error: this expression creates a reference which is immediately dereferenced by the compiler --> src/common.rs:447:34 | 447 | unquote_block_string(&block), | ^^^^^^ help: change this to: `block` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `-D clippy::needless-borrow` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::needless_borrow)]` ```
1 parent bd505dd commit 01bf047

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/common.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ mod tests {
438438
fn block_string_leading_and_trailing_empty_lines() {
439439
let block = &triple_quote(" \n\n Hello,\n World!\n\n Yours,\n GraphQL.\n\n\n");
440440
assert_eq!(
441-
unquote_block_string(&block),
441+
unquote_block_string(block),
442442
Result::Ok("Hello,\n World!\n\nYours,\n GraphQL.".to_string())
443443
);
444444
}
@@ -447,7 +447,7 @@ mod tests {
447447
fn block_string_indent() {
448448
let block = &triple_quote("Hello \n\n Hello,\n World!\n");
449449
assert_eq!(
450-
unquote_block_string(&block),
450+
unquote_block_string(block),
451451
Result::Ok("Hello \n\nHello,\n World!".to_string())
452452
);
453453
}

0 commit comments

Comments
 (0)