Skip to content

Commit 9133555

Browse files
committed
Fix lint
1 parent 3e13b27 commit 9133555

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

.cargo/config.toml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,27 @@ rustflags = [
33
"-Wabsolute_paths_not_starting_with_crate",
44
"-Welided_lifetimes_in_paths",
55
"-Wexplicit_outlives_requirements",
6+
"-Wffi_unwind_calls",
67
"-Wkeyword_idents",
8+
"-Wlet_underscore_drop",
79
"-Wmacro_use_extern_crate",
810
"-Wmeta_variable_misuse",
911
"-Wmissing_abi",
12+
"-Wmissing_copy_implementations",
1013
"-Wmissing_debug_implementations",
1114
"-Wmissing_docs",
1215
"-Wnon_ascii_idents",
13-
"-Wnoop_method_call",
14-
"-Wpointer_structural_match",
1516
"-Wsingle_use_lifetimes",
1617
"-Wtrivial_casts",
1718
"-Wtrivial_numeric_casts",
19+
"-Wunit_bindings",
1820
"-Wunsafe_code",
1921
"-Wunsafe_op_in_unsafe_fn",
22+
"-Wunused_crate_dependencies",
2023
"-Wunused_extern_crates",
2124
"-Wunused_import_braces",
2225
"-Wunused_lifetimes",
23-
"-Wunused_qualifications",
26+
"-Wunused_macro_rules",
2427
"-Wunused_results",
25-
"-Wvariant_size_differences"
28+
"-Wvariant_size_differences",
2629
]

src/list_ordered_multimap.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ use core::{
77
borrow::Borrow,
88
fmt::{self, Debug, Formatter},
99
hash::{BuildHasher, Hash, Hasher},
10-
iter::{FromIterator, FusedIterator},
10+
iter::FusedIterator,
1111
marker::PhantomData,
12+
mem,
1213
};
1314

1415
use dlv_list::{
@@ -1369,7 +1370,7 @@ where
13691370
match entry {
13701371
RawEntryMut::Occupied(entry) => {
13711372
let (key_index, map_entry) = entry.remove_entry();
1372-
let _ = self.keys.remove(key_index).unwrap();
1373+
mem::drop(self.keys.remove(key_index).unwrap());
13731374
EntryValuesDrain::from_map_entry(&mut self.values, &map_entry)
13741375
}
13751376
RawEntryMut::Vacant(_) => EntryValuesDrain::empty(&mut self.values),
@@ -1568,7 +1569,7 @@ where
15681569

15691570
if value_entry.previous_index.is_none() && value_entry.next_index.is_none() {
15701571
let _ = entry.remove();
1571-
let _ = keys.remove(value_entry.key_index);
1572+
mem::drop(keys.remove(value_entry.key_index));
15721573
} else {
15731574
let map_entry = entry.get_mut();
15741575
map_entry.length -= 1;
@@ -3456,7 +3457,7 @@ impl BuildHasher for DummyState {
34563457
}
34573458

34583459
/// Dummy hasher that is not meant to be used. It is simply a placeholder.
3459-
#[derive(Clone, Debug)]
3460+
#[derive(Clone, Copy, Debug)]
34603461
pub struct DummyHasher;
34613462

34623463
impl Hasher for DummyHasher {

0 commit comments

Comments
 (0)