Use matches! to fix Clippy warning (#473)

master
Stanislav Tkach 5 years ago committed by GitHub
parent 29802a4b71
commit 3e223d1591
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      librocksdb-sys/build.rs
  2. 3
      src/lib.rs

@ -147,10 +147,14 @@ fn build_rocksdb() {
lib_sources = lib_sources lib_sources = lib_sources
.iter() .iter()
.cloned() .cloned()
.filter(|file| match *file { .filter(|file| {
"port/port_posix.cc" | "env/env_posix.cc" | "env/fs_posix.cc" !matches!(
| "env/io_posix.cc" => false, *file,
_ => true, "port/port_posix.cc"
| "env/env_posix.cc"
| "env/fs_posix.cc"
| "env/io_posix.cc"
)
}) })
.collect::<Vec<&'static str>>(); .collect::<Vec<&'static str>>();

@ -68,7 +68,8 @@
// False positive: WebSocket // False positive: WebSocket
clippy::doc_markdown, clippy::doc_markdown,
clippy::missing_safety_doc, clippy::missing_safety_doc,
clippy::needless_pass_by_value clippy::needless_pass_by_value,
clippy::option_if_let_else,
)] )]
#[macro_use] #[macro_use]

Loading…
Cancel
Save