Skip to content

Commit 45f1c4a

Browse files
committed
Resolve borrow_deref_ref clippy lint
error: deref on an immutable reference --> src/value/mod.rs:428:45 | 428 | Value::Array(ref array) => Some(&*array), | ^^^^^^^ | = note: `-D clippy::borrow-deref-ref` implied by `-D clippy::all` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref help: if you would like to reborrow, try removing `&*` | 428 | Value::Array(ref array) => Some(array), | ~~~~~ help: if you would like to deref, try using `&**` | 428 | Value::Array(ref array) => Some(&**array), | ~~~~~~~~
1 parent de5c34b commit 45f1c4a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/value/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ impl Value {
425425
/// ```
426426
pub fn as_array(&self) -> Option<&Vec<Value>> {
427427
match *self {
428-
Value::Array(ref array) => Some(&*array),
428+
Value::Array(ref array) => Some(array),
429429
_ => None,
430430
}
431431
}

0 commit comments

Comments
 (0)