mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-06 12:06:49 +00:00
dragonball: Fix clippy missing_docs
Fix `missing_docs` clippy warning as suggested by rust 1.85.1. ```console error: missing documentation for an associated function --> src/device_manager/mod.rs:1299:9 | 1299 | pub fn new_test_mgr() -> Self { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `-D missing-docs` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(missing_docs)]` ``` Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
This commit is contained in:
parent
ceff1ed98d
commit
e8be3c13fb
@ -556,7 +556,8 @@ mod tests {
|
||||
self.processed_refill_time
|
||||
}
|
||||
|
||||
// After a restore, we cannot be certain that the last_update field has the same value.
|
||||
/// Helper function to help comparing `TokenBucket` after update.
|
||||
/// After a restore, we cannot be certain that the last_update field has the same value.
|
||||
pub fn partial_eq(&self, other: &TokenBucket) -> bool {
|
||||
(other.capacity() == self.capacity())
|
||||
&& (other.one_time_burst() == self.one_time_burst())
|
||||
|
@ -1296,6 +1296,7 @@ mod tests {
|
||||
}
|
||||
|
||||
impl DeviceManager {
|
||||
/// Helper function to create a dummy DeviceManager for testing purpose
|
||||
pub fn new_test_mgr() -> Self {
|
||||
let kvm = Kvm::new().unwrap();
|
||||
let vm = kvm.create_vm().unwrap();
|
||||
|
@ -874,6 +874,8 @@ impl Vm {
|
||||
}
|
||||
}
|
||||
|
||||
/// Unit test module for methods of struct Vm, and helper functions to shorten
|
||||
/// test code.
|
||||
#[cfg(test)]
|
||||
pub mod tests {
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
@ -889,6 +891,7 @@ pub mod tests {
|
||||
use crate::test_utils::tests::create_vm_for_test;
|
||||
|
||||
impl Vm {
|
||||
/// Helper function to forch change `mstate` of Vms
|
||||
pub fn set_instance_state(&mut self, mstate: InstanceState) {
|
||||
self.shared_info
|
||||
.write()
|
||||
@ -897,6 +900,7 @@ pub mod tests {
|
||||
}
|
||||
}
|
||||
|
||||
/// Helper function to create dummy Vm instance for testing purpose
|
||||
pub fn create_vm_instance() -> Vm {
|
||||
let instance_info = Arc::new(RwLock::new(InstanceInfo::default()));
|
||||
let epoll_manager = EpollManager::default();
|
||||
|
Loading…
Reference in New Issue
Block a user