Skip to content

Commit

Permalink
Merge pull request #73 from utam0k/get_copy
Browse files Browse the repository at this point in the history
The user who uses this crate should be able to choose whether to copy or not.
  • Loading branch information
Furisto committed Sep 26, 2021
2 parents b2f1166 + 08edd9a commit 0110ba4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/runtime/capability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ mod tests {

#[test]
fn deserialize() -> Result<()> {
for case in vec!["SYSLOG", "CAP_SYSLOG", "cap_SYSLOG", "sySloG"] {
for case in &["SYSLOG", "CAP_SYSLOG", "cap_SYSLOG", "sySloG"] {
let res: Capability = serde_json::from_str(&format!("\"{}\"", case))?;
assert_eq!(Capability::Syslog, res);
}
Expand Down
4 changes: 2 additions & 2 deletions src/runtime/linux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ pub struct LinuxResources {
devices: Option<Vec<LinuxDeviceCgroup>>,

#[serde(default, skip_serializing_if = "Option::is_none")]
#[getset(get_copy = "pub")]
#[getset(get = "pub")]
/// Memory restriction configuration.
memory: Option<LinuxMemory>,

Expand All @@ -577,7 +577,7 @@ pub struct LinuxResources {
cpu: Option<LinuxCpu>,

#[serde(default, skip_serializing_if = "Option::is_none")]
#[getset(get_copy = "pub")]
#[getset(get = "pub")]
/// Task resource restrictions
pids: Option<LinuxPids>,

Expand Down

0 comments on commit 0110ba4

Please sign in to comment.