Skip to content

Commit

Permalink
mounts: Make apply a Mounts method
Browse files Browse the repository at this point in the history
Not an associated function.

Signed-off-by: Samuel Ortiz <[email protected]>
  • Loading branch information
Samuel Ortiz authored and sameo committed Apr 13, 2022
1 parent 52bec76 commit 52e5476
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions container/src/mounts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ impl Mounts {
/// Apply some mounts.
/// This method should be called before the container process execution in order to prepare
/// & mount every mounts defined for it.
pub fn apply(mounts: &Mounts) -> Result<(), std::io::Error> {
for mount in &mounts.vec {
pub fn apply(&self) -> Result<(), std::io::Error> {
for mount in &self.vec {
if let Some(code) = Command::new("mount")
.args(["-t", &mount.typ, &mount.source, &mount.destination])
.status()?
Expand Down

0 comments on commit 52e5476

Please sign in to comment.