Skip to content

Commit 2072f8a

Browse files
committed
chore: fix clippy warnings
1 parent 0870373 commit 2072f8a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/core/pool.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ impl Pool {
3636
pub fn create_buffer_from_str(&mut self, str: &str) -> Option<TemporaryBuffer> {
3737
let mut buffer = self.create_buffer(str.len())?;
3838
unsafe {
39-
let mut buf = buffer.as_ngx_buf_mut();
39+
let buf = buffer.as_ngx_buf_mut();
4040
ptr::copy_nonoverlapping(str.as_ptr(), (*buf).pos, str.len());
4141
(*buf).last = (*buf).pos.add(str.len());
4242
}

src/http/request.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ impl Request {
341341
};
342342

343343
// previously call of ngx_http_subrequest() would ensure that the pointer is not null anymore
344-
let mut sr = unsafe { &mut *psr };
344+
let sr = unsafe { &mut *psr };
345345

346346
/*
347347
* allocate fake request body to avoid attempts to read it and to make

src/log.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,9 @@ mod tests {
199199
let mock = MockLog { log_level: 16 };
200200

201201
let mut r = check_mask(DebugMask::Core, mock.log_level);
202-
assert!(r == true);
202+
assert!(r);
203203

204204
r = check_mask(DebugMask::Alloc, mock.log_level);
205-
assert!(r == false);
205+
assert!(!r);
206206
}
207207
}

0 commit comments

Comments
 (0)