Skip to content

Commit

Permalink
fix: remove unnecessary async in VMM::new
Browse files Browse the repository at this point in the history
Signed-off-by: Mateo Fernandez <[email protected]>
  • Loading branch information
mfernd committed May 6, 2024
1 parent 0221e8d commit e68edb3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/vmm/src/core/vmm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ pub struct VMM {

impl VMM {
/// Create a new VMM.
pub async fn new(
pub fn new(
iface_host_addr: Ipv4Addr,
netmask: Ipv4Addr,
iface_guest_addr: Ipv4Addr,
Expand Down
4 changes: 1 addition & 3 deletions src/vmm/src/grpc/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,7 @@ impl VmmServiceTrait for VmmService {

let initramfs_path = self.get_initramfs(&language, curr_dir.as_os_str())?;

let mut vmm = VMM::new(HOST_IP, HOST_NETMASK, GUEST_IP)
.await
.map_err(VmmErrors::VmmNew)?;
let mut vmm = VMM::new(HOST_IP, HOST_NETMASK, GUEST_IP).map_err(VmmErrors::VmmNew)?;

// Configure the VMM parameters might need to be calculated rather than hardcoded
vmm.configure(1, 4000, kernel_path, &Some(initramfs_path))
Expand Down
1 change: 0 additions & 1 deletion src/vmm/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
cli_args.netmask,
cli_args.iface_guest_addr,
)
.await
.map_err(VmmErrors::VmmNew)
.unwrap();

Expand Down

0 comments on commit e68edb3

Please sign in to comment.