Skip to content

Commit 6b1b149

Browse files
committed
style: Remove needless borrow
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 4eb2275 commit 6b1b149

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/common.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ mod tests {
444444
fn block_string_leading_and_trailing_empty_lines() {
445445
let block = &triple_quote(" \n\n Hello,\n World!\n\n Yours,\n GraphQL.\n\n\n");
446446
assert_eq!(
447-
unquote_block_string(&block),
447+
unquote_block_string(block),
448448
Result::Ok("Hello,\n World!\n\nYours,\n GraphQL.".to_string())
449449
);
450450
}
@@ -453,7 +453,7 @@ mod tests {
453453
fn block_string_indent() {
454454
let block = &triple_quote("Hello \n\n Hello,\n World!\n");
455455
assert_eq!(
456-
unquote_block_string(&block),
456+
unquote_block_string(block),
457457
Result::Ok("Hello \n\nHello,\n World!".to_string())
458458
);
459459
}

0 commit comments

Comments
 (0)