Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to cap-std 3, bump to 4 #48

Merged
merged 1 commit into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ name = "cap-std-ext"
readme = "README.md"
repository = "https://github.com/coreos/cap-std-ext"
# For historical reasons, the major version number is one greater than the cap-std major.
version = "3.0.1"
version = "4.0.0"

[dependencies]
cap-tempfile = "2"
cap-primitives = "2"
cap-tempfile = "3"
cap-primitives = "3"

[target.'cfg(not(windows))'.dependencies]
rustix = { version = "0.38", features = ["fs", "procfs", "process", "pipe"] }
Expand Down
4 changes: 2 additions & 2 deletions src/dirext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ pub trait CapStdExtDirExt {
/// somedir.atomic_replace_with("somefilename", |f| -> io::Result<_> {
/// f.write_all(contents)?;
/// f.flush()?;
/// use std::os::unix::prelude::PermissionsExt;
/// use cap_std::fs::PermissionsExt;
/// let perms = cap_std::fs::Permissions::from_mode(0o600);
/// f.get_mut().as_file_mut().set_permissions(perms)?;
/// Ok(())
Expand Down Expand Up @@ -276,7 +276,7 @@ impl CapStdExtDirExt for Dir {
// secret data.
#[cfg(unix)]
{
use std::os::unix::prelude::PermissionsExt;
use cap_std::fs::PermissionsExt;
let perms = cap_std::fs::Permissions::from_mode(0o600);
f.get_mut().as_file_mut().set_permissions(perms)?;
}
Expand Down
3 changes: 1 addition & 2 deletions tests/it/main.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
use anyhow::Result;

use cap_std::fs::{Dir, File, Permissions};
use cap_std::fs::{Dir, File, Permissions, PermissionsExt};
use cap_std_ext::cap_std;
use cap_std_ext::cmdext::CapStdExtCommandExt;
use cap_std_ext::dirext::CapStdExtDirExt;
use std::io::Write;
use std::os::unix::prelude::PermissionsExt;
use std::path::Path;
use std::{process::Command, sync::Arc};

Expand Down