Merge pull request #7425 from jongwu/remove_mut

runtime-rs: remove unneeded 'mut' keywords
This commit is contained in:
Fabiano Fidêncio 2023-07-26 21:24:40 +02:00 committed by GitHub
commit 9792ac49fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -96,7 +96,7 @@ impl InitialSizeManager {
pub fn setup_config(&self, config: &mut TomlConfig) -> Result<()> {
// update this data to the hypervisor config for later use by hypervisor
let hypervisor_name = &config.runtime.hypervisor_name;
let mut hv = config
let hv = config
.hypervisor
.get_mut(hypervisor_name)
.context("failed to get hypervisor config")?;

View File

@ -73,7 +73,7 @@ impl SPDKVolume {
}
}
let mut vhu_blk_config = &mut VhostUserConfig {
let vhu_blk_config = &mut VhostUserConfig {
socket_path: device,
device_type: VhostUserType::Blk("vhost-user-blk-pci".to_owned()),
..Default::default()

View File

@ -95,7 +95,7 @@ impl Container {
amend_spec(&mut spec, toml_config.runtime.disable_guest_seccomp).context("amend 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,
None => return Err(anyhow!("spec miss root field")),
};