Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Amanieu committed Feb 11, 2024
1 parent f2e6212 commit 3ca0820
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6805,7 +6805,7 @@ mod test_map {
assert_eq!(m2.len(), 2);
}

thread_local! { static DROP_VECTOR: RefCell<Vec<i32>> = RefCell::new(Vec::new()) }
thread_local! { static DROP_VECTOR: RefCell<Vec<i32>> = const { RefCell::new(Vec::new()) } }

#[derive(Hash, PartialEq, Eq)]
struct Droppable {
Expand Down Expand Up @@ -8524,7 +8524,7 @@ mod test_map {
#[test]
#[should_panic = "panic in clone"]
fn test_clone_from_memory_leaks() {
use ::alloc::vec::Vec;
use alloc::vec::Vec;

struct CheckedClone {
panic_in_clone: bool,
Expand Down
3 changes: 2 additions & 1 deletion src/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2820,7 +2820,7 @@ mod test_set {
assert_eq!(last_i, 49);
}

for _ in &s {
if !s.is_empty() {
panic!("s should be empty!");
}

Expand All @@ -2834,6 +2834,7 @@ mod test_set {
use core::hash;

#[derive(Debug)]
#[allow(dead_code)]
struct Foo(&'static str, i32);

impl PartialEq for Foo {
Expand Down

0 comments on commit 3ca0820

Please sign in to comment.