@@ -556,7 +556,7 @@ impl Kvm {
556
556
/// // Check that the VM mmap size is the same reported by `KVM_GET_VCPU_MMAP_SIZE`.
557
557
/// assert!(vm.run_size() == kvm.get_vcpu_mmap_size().unwrap());
558
558
/// ```
559
- #[ cfg( not( any ( target_arch = "aarch64" ) ) ) ]
559
+ #[ cfg( not( target_arch = "aarch64" ) ) ]
560
560
pub fn create_vm ( & self ) -> Result < VmFd > {
561
561
self . create_vm_with_type ( 0 ) // Create using default VM type
562
562
}
@@ -574,7 +574,7 @@ impl Kvm {
574
574
/// let kvm = Kvm::new().unwrap();
575
575
/// let vm = kvm.create_vm().unwrap();
576
576
/// // Check that the VM mmap size is the same reported by `KVM_GET_VCPU_MMAP_SIZE`.
577
- /// assert !(vm.run_size() == kvm.get_vcpu_mmap_size().unwrap());
577
+ /// assert_eq !(vm.run_size(), kvm.get_vcpu_mmap_size().unwrap());
578
578
/// ```
579
579
#[ cfg( target_arch = "aarch64" ) ]
580
580
pub fn create_vm ( & self ) -> Result < VmFd > {
@@ -612,7 +612,7 @@ impl Kvm {
612
612
/// let host_ipa_limit = kvm.get_host_ipa_limit();
613
613
/// let vm = kvm.create_vm_with_ipa_size(host_ipa_limit as u32).unwrap();
614
614
/// // Check that the VM mmap size is the same reported by `KVM_GET_VCPU_MMAP_SIZE`.
615
- /// assert !(vm.run_size() == kvm.get_vcpu_mmap_size().unwrap());
615
+ /// assert_eq !(vm.run_size(), kvm.get_vcpu_mmap_size().unwrap());
616
616
/// }
617
617
/// ```
618
618
#[ cfg( target_arch = "aarch64" ) ]
@@ -635,7 +635,7 @@ impl Kvm {
635
635
/// let kvm = Kvm::new().unwrap();
636
636
/// let vm = kvm.create_vm_with_type(0).unwrap();
637
637
/// // Check that the VM mmap size is the same reported by `KVM_GET_VCPU_MMAP_SIZE`.
638
- /// assert !(vm.run_size() == kvm.get_vcpu_mmap_size().unwrap());
638
+ /// assert_eq !(vm.run_size(), kvm.get_vcpu_mmap_size().unwrap());
639
639
/// ```
640
640
pub fn create_vm_with_type ( & self , vm_type : u64 ) -> Result < VmFd > {
641
641
// SAFETY: Safe because we know `self.kvm` is a real KVM fd as this module is the only one
0 commit comments