Skip to content

Commit c4850ef

Browse files
authored
Merge pull request #44 from Tim-Zhang/impl-clone
Impl Clone for hierarchies:V1, hierarchies:V2
2 parents af7a75c + aa207ed commit c4850ef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/hierarchies.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ use crate::cgroup::Cgroup;
3535
/// Process mounts information.
3636
///
3737
/// See `proc(5)` for format details.
38-
#[derive(Debug, PartialEq, Eq, Hash)]
38+
#[derive(Debug, PartialEq, Eq, Hash, Clone)]
3939
pub struct Mountinfo {
4040
/// Mount pathname relative to the process's root.
4141
pub mount_point: PathBuf,
@@ -102,12 +102,12 @@ pub fn mountinfo_self() -> Vec<Mountinfo> {
102102
}
103103

104104
/// The standard, original cgroup implementation. Often referred to as "cgroupv1".
105-
#[derive(Debug)]
105+
#[derive(Debug, Clone)]
106106
pub struct V1 {
107107
mountinfo: Vec<Mountinfo>,
108108
}
109109

110-
#[derive(Debug)]
110+
#[derive(Debug, Clone)]
111111
pub struct V2 {
112112
root: String,
113113
}

0 commit comments

Comments
 (0)