mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-29 20:24:31 +00:00
runtime-rs: remove unneeded 'mut' keywords
These unneeded 'mut' keywords blocks built by rust 1.71.0. Remove them. Fixes: #7424 Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
This commit is contained in:
parent
e1a4040a6c
commit
2c8f83424d
@ -96,7 +96,7 @@ impl InitialSizeManager {
|
|||||||
pub fn setup_config(&self, config: &mut TomlConfig) -> Result<()> {
|
pub fn setup_config(&self, config: &mut TomlConfig) -> Result<()> {
|
||||||
// update this data to the hypervisor config for later use by hypervisor
|
// update this data to the hypervisor config for later use by hypervisor
|
||||||
let hypervisor_name = &config.runtime.hypervisor_name;
|
let hypervisor_name = &config.runtime.hypervisor_name;
|
||||||
let mut hv = config
|
let hv = config
|
||||||
.hypervisor
|
.hypervisor
|
||||||
.get_mut(hypervisor_name)
|
.get_mut(hypervisor_name)
|
||||||
.context("failed to get hypervisor config")?;
|
.context("failed to get hypervisor config")?;
|
||||||
|
@ -73,7 +73,7 @@ impl SPDKVolume {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut vhu_blk_config = &mut VhostUserConfig {
|
let vhu_blk_config = &mut VhostUserConfig {
|
||||||
socket_path: device,
|
socket_path: device,
|
||||||
device_type: VhostUserType::Blk("vhost-user-blk-pci".to_owned()),
|
device_type: VhostUserType::Blk("vhost-user-blk-pci".to_owned()),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
|
@ -95,7 +95,7 @@ impl Container {
|
|||||||
amend_spec(&mut spec, toml_config.runtime.disable_guest_seccomp).context("amend spec")?;
|
amend_spec(&mut spec, toml_config.runtime.disable_guest_seccomp).context("amend spec")?;
|
||||||
|
|
||||||
// get mutable root from oci spec
|
// get mutable root from oci spec
|
||||||
let mut root = match spec.root.as_mut() {
|
let root = match spec.root.as_mut() {
|
||||||
Some(root) => root,
|
Some(root) => root,
|
||||||
None => return Err(anyhow!("spec miss root field")),
|
None => return Err(anyhow!("spec miss root field")),
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user