Skip to content

Commit

Permalink
fix use of NonZero
Browse files Browse the repository at this point in the history
  • Loading branch information
radumarias committed May 13, 2024
1 parent 7db4574 commit 91c1758
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "rencfs"
description = "An encrypted file system that mounts with FUSE on Linux. It can be used to create encrypted directories."
version = "0.7.0"
version = "0.7.1"
edition = "2021"
license = "Apache-2.0"
authors = ["Radu Marias <[email protected]>"]
Expand Down
4 changes: 2 additions & 2 deletions src/encryptedfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::fmt::Debug;
use std::fs::{File, OpenOptions, ReadDir};
use std::io::ErrorKind::Other;
use std::io::{SeekFrom, Write};
use std::num::{NonZero, ParseIntError};
use std::num::{NonZeroUsize, ParseIntError};
use std::path::{Path, PathBuf};
use std::str::FromStr;
use std::sync::atomic::AtomicU64;
Expand Down Expand Up @@ -720,7 +720,7 @@ impl EncryptedFs {
key: ExpireValue::new(key_provider, Duration::from_secs(10 * 60)),
self_weak: std::sync::Mutex::new(None),
read_write_locks: ArcHashMap::default(),
attr_cache: parking_lot::Mutex::new(LruCache::new(NonZero::new(100).unwrap())),
attr_cache: parking_lot::Mutex::new(LruCache::new(NonZeroUsize::new(100).unwrap())),
};

fs.ensure_root_exists().await?;
Expand Down

0 comments on commit 91c1758

Please sign in to comment.