Skip to content

Commit

Permalink
drop mut for variables that are not mutated to enable build with rust…
Browse files Browse the repository at this point in the history
… 1.72.0 (#63)

* kata-types: drop mut for variables that are not mutated

Signed-off-by: Muhammad Falak R Wani <[email protected]>

* agent: drop mut from variable which is not mutated

Signed-off-by: Muhammad Falak R Wani <[email protected]>

---------

Signed-off-by: Muhammad Falak R Wani <[email protected]>
  • Loading branch information
mfrw authored Oct 19, 2023
1 parent 0f5419f commit 2795dae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/agent/src/signal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ async fn handle_sigchild(logger: Logger, sandbox: Arc<Mutex<Sandbox>>) -> Result
continue;
}

let mut p = process.unwrap();
let p = process.unwrap();

let ret: i32 = match wait_status {
WaitStatus::Exited(_, c) => c,
Expand Down
4 changes: 2 additions & 2 deletions src/libs/kata-types/src/annotations/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,8 @@ impl Annotation {
let u32_err = io::Error::new(io::ErrorKind::InvalidData, "parse u32 error".to_string());
let u64_err = io::Error::new(io::ErrorKind::InvalidData, "parse u64 error".to_string());
let i32_err = io::Error::new(io::ErrorKind::InvalidData, "parse i32 error".to_string());
let mut hv = config.hypervisor.get_mut(hypervisor_name).unwrap();
let mut ag = config.agent.get_mut(agent_name).unwrap();
let hv = config.hypervisor.get_mut(hypervisor_name).unwrap();
let ag = config.agent.get_mut(agent_name).unwrap();
for (key, value) in &self.annotations {
if hv.security_info.is_annotation_enabled(key) {
match key.as_str() {
Expand Down

0 comments on commit 2795dae

Please sign in to comment.