Skip to content

Commit

Permalink
adjust lints
Browse files Browse the repository at this point in the history
  • Loading branch information
iliana committed Oct 3, 2024
1 parent 2d10a54 commit 8e0fd4a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ impl<'a> SealOptions<'a> {
///
/// If the file doesn't support sealing (or `fcntl(2)` otherwise returns an error), this method
/// returns `false`.
#[must_use]
pub fn is_sealed(&self, file: &File) -> bool {
self.is_sealed_inner(file).unwrap_or(false)
}
Expand Down
6 changes: 4 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@
missing_copy_implementations,
missing_debug_implementations,
missing_docs,
rust_2018_idioms
rust_2018_idioms,
unsafe_op_in_unsafe_fn
)]
#![warn(clippy::pedantic)]
#![allow(clippy::must_use_candidate, clippy::needless_doctest_main)]
#![allow(clippy::needless_doctest_main)]

#[cfg(not(any(target_os = "linux", target_os = "android")))]
compile_error!("pentacle only works on linux or android");
Expand Down Expand Up @@ -86,6 +87,7 @@ pub fn ensure_sealed() -> Result<(), Error> {
/// Verify whether the currently running program is a sealed anonymous file.
///
/// This function returns `false` if opening `/proc/self/exe` fails.
#[must_use]
pub fn is_sealed() -> bool {
File::open("/proc/self/exe")
.map(|f| OPTIONS.is_sealed(&f))
Expand Down

0 comments on commit 8e0fd4a

Please sign in to comment.