Skip to content

Commit f40ccdc

Browse files
committed
cairo: Fix yet another new clippy warning
error: the borrowed expression implements the required traits --> cairo/src/surface.rs:424:54 | 424 | assert!(surface.set_mime_data(MIME_TYPE_PNG, &[1u8, 10u8]).is_ok()); | ^^^^^^^^^^^^ help: change this to: `[1u8, 10u8]` | = note: `-D clippy::needless-borrow` implied by `-D warnings` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
1 parent 09a333f commit f40ccdc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cairo/src/surface.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ mod tests {
421421
/* Initially the data for any mime type has to be none */
422422
assert!(data.is_none());
423423

424-
assert!(surface.set_mime_data(MIME_TYPE_PNG, &[1u8, 10u8]).is_ok());
424+
assert!(surface.set_mime_data(MIME_TYPE_PNG, [1u8, 10u8]).is_ok());
425425
let data = surface.mime_data(MIME_TYPE_PNG).unwrap();
426426
assert_eq!(data, &[1u8, 10u8]);
427427
}

0 commit comments

Comments
 (0)