Skip to content

Commit

Permalink
rust: update to 2021 edition
Browse files Browse the repository at this point in the history
Signed-off-by: Aleksa Sarai <[email protected]>
  • Loading branch information
cyphar committed Aug 4, 2024
1 parent 76303b1 commit 8e64539
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ readme = "README.md"

keywords = ["file", "fs", "security", "linux"]
categories = ["filesystem"]
edition = "2018"
edition = "2021"

[badges]
maintenance = { status = "experimental" }
Expand Down
1 change: 0 additions & 1 deletion src/capi/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ use crate::error::{self, Error};

use std::{
cmp,
convert::TryInto,
ffi::{CStr, CString, OsStr},
io::Error as IOError,
os::unix::ffi::OsStrExt,
Expand Down
1 change: 0 additions & 1 deletion src/procfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ use crate::{
};

use std::{
convert::TryFrom,
fs::File,
os::fd::AsRawFd,
os::unix::fs::MetadataExt,
Expand Down
4 changes: 2 additions & 2 deletions src/tests/common/mntns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ pub(crate) fn mount<P: AsRef<Path>>(dst: P, ty: MountType) -> Result<(), Error>
let ret = match ty {
MountType::Tmpfs => unsafe {
libc::mount(
CString::new("")?.as_ptr(),
c"".as_ptr(),
dst_path.as_ptr(),
CString::new("tmpfs")?.as_ptr(),
c"tmpfs".as_ptr(),
0,
ptr::null(),
)
Expand Down

0 comments on commit 8e64539

Please sign in to comment.