Skip to content

Commit 784557d

Browse files
committed
Apply clippy feedback
1 parent 3506103 commit 784557d

File tree

5 files changed

+58
-59
lines changed

5 files changed

+58
-59
lines changed

src/event_log.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ impl EventLog {
109109
.get(&pid)
110110
.unwrap()
111111
.iter()
112-
.map(|ptr| {
113-
let mut ptr = *ptr;
112+
.map(|ptr_ref| {
113+
let mut ptr = *ptr_ref;
114114
ptr.forget_heap_log_coordinates();
115115
ptr
116116
})

src/flusher.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ impl Flusher {
4343
let join_handle = thread::Builder::new()
4444
.name(name)
4545
.spawn({
46-
let shutdown = shutdown.clone();
47-
let sc = sc.clone();
48-
move || run(&shutdown, &sc, &pagecache, flush_every_ms)
46+
let shutdown2 = shutdown.clone();
47+
let sc2 = sc.clone();
48+
move || run(&shutdown2, &sc2, &pagecache, flush_every_ms)
4949
})
5050
.unwrap();
5151

@@ -54,13 +54,13 @@ impl Flusher {
5454
}
5555

5656
fn run(
57-
shutdown: &Arc<Mutex<ShutdownState>>,
57+
shutdown_mu: &Arc<Mutex<ShutdownState>>,
5858
sc: &Arc<Condvar>,
5959
pagecache: &PageCache,
6060
flush_every_ms: u64,
6161
) {
6262
let flush_every = Duration::from_millis(flush_every_ms);
63-
let mut shutdown = shutdown.lock();
63+
let mut shutdown = shutdown_mu.lock();
6464
let mut wrote_data = false;
6565
while shutdown.is_running() || wrote_data {
6666
let before = std::time::Instant::now();

src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@
138138
clippy::non_ascii_literal,
139139
clippy::path_buf_push_overwrite,
140140
clippy::print_stdout,
141-
clippy::pub_enum_variant_names,
142141
clippy::redundant_closure_for_method_calls,
143142
clippy::shadow_reuse,
144143
clippy::shadow_same,
@@ -152,7 +151,6 @@
152151
clippy::unseparated_literal_suffix,
153152
clippy::used_underscore_binding,
154153
clippy::wildcard_dependencies,
155-
clippy::wrong_pub_self_convention,
156154
))]
157155
#![cfg_attr(
158156
feature = "testing",

src/serialization.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ impl Serialize for MessageHeader {
100100

101101
fn serialize_into(&self, buf: &mut &mut [u8]) {
102102
self.crc32.serialize_into(buf);
103-
self.kind.into().serialize_into(buf);
103+
(self.kind as u8).serialize_into(buf);
104104
self.len.serialize_into(buf);
105105
self.segment_number.serialize_into(buf);
106106
self.pid.serialize_into(buf);

0 commit comments

Comments
 (0)