Skip to content

Commit

Permalink
chore: fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanitskiy committed Aug 31, 2023
1 parent cd0e044 commit 7bbfe68
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/core/pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ impl Pool {
pub fn create_buffer_from_str(&mut self, str: &str) -> Option<TemporaryBuffer> {
let mut buffer = self.create_buffer(str.len())?;
unsafe {
let mut buf = buffer.as_ngx_buf_mut();
let buf = buffer.as_ngx_buf_mut();
ptr::copy_nonoverlapping(str.as_ptr(), (*buf).pos, str.len());
(*buf).last = (*buf).pos.add(str.len());
}
Expand Down
2 changes: 1 addition & 1 deletion src/http/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ impl Request {
};

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

/*
* allocate fake request body to avoid attempts to read it and to make
Expand Down
4 changes: 2 additions & 2 deletions src/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,9 @@ mod tests {
let mock = MockLog { log_level: 16 };

let mut r = check_mask(DebugMask::Core, mock.log_level);
assert!(r == true);
assert!(r);

r = check_mask(DebugMask::Alloc, mock.log_level);
assert!(r == false);
assert!(!r);
}
}

0 comments on commit 7bbfe68

Please sign in to comment.