Skip to content

Commit

Permalink
Disallow panicking code via lints
Browse files Browse the repository at this point in the history
  • Loading branch information
MarijnS95 committed May 5, 2024
1 parent ced9df0 commit d40191f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/capability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ pub struct Capabilities {
impl From<v4l2_capability> for Capabilities {
fn from(cap: v4l2_capability) -> Self {
Self {
// TODO: CStr::from_bytes_until_nul()
driver: str::from_utf8(&cap.driver)
.unwrap()
.trim_matches(char::from(0))
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
//!```
//!
//! Have a look at the examples to learn more about device and buffer management.
#![deny(clippy::panic, clippy::unwrap_used, clippy::expect_used)]

#[cfg(feature = "v4l-sys")]
pub use v4l_sys;
Expand Down

0 comments on commit d40191f

Please sign in to comment.