Skip to content

Commit

Permalink
Fix clippy lints
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher N. Hesse <[email protected]>
  • Loading branch information
raymanfx committed Aug 8, 2024
1 parent b7a5001 commit 8953d41
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/glium.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ fn main() -> io::Result<()> {

let dev = RwLock::new(Device::with_path(path)?);
{
let dev = dev.write().unwrap();
let dev = dev.read().unwrap();
format = dev.format()?;
params = dev.params()?;

Expand Down Expand Up @@ -126,7 +126,7 @@ fn main() -> io::Result<()> {
let (tx, rx) = mpsc::channel();

thread::spawn(move || {
let dev = dev.write().unwrap();
let dev = dev.read().unwrap();

// Setup a buffer stream
let mut stream = MmapStream::with_buffers(&dev, Type::VideoCapture, buffer_count).unwrap();
Expand Down
2 changes: 1 addition & 1 deletion src/v4l2/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ pub unsafe fn mmap(
offset: libc::off_t,
) -> io::Result<*mut std::os::raw::c_void> {
let ret = detail::mmap(start, length, prot, flags, fd, offset);
if ret as usize == std::usize::MAX {
if ret as usize == usize::MAX {
Err(io::Error::last_os_error())
} else {
Ok(ret)
Expand Down

0 comments on commit 8953d41

Please sign in to comment.