Fix no_std after #553 (#554)

* Fix no_std after #553

* clippy
This commit is contained in:
Andrea Fioraldi 2022-02-23 11:32:25 +01:00 committed by GitHub
parent 5ffddcfd4a
commit 05b10ad56d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -914,7 +914,7 @@ impl TimeFeedback {
} }
} }
/// Consider interesting a testcase if the list in ListObserver is not empty. /// Consider interesting a testcase if the list in `ListObserver` is not empty.
#[derive(Serialize, Deserialize, Clone, Debug)] #[derive(Serialize, Deserialize, Clone, Debug)]
pub struct ListFeedback<T> pub struct ListFeedback<T>
where where

View File

@ -23,7 +23,10 @@ pub mod owned;
#[cfg(unstable_feature)] #[cfg(unstable_feature)]
pub use owned::*; pub use owned::*;
use alloc::string::{String, ToString}; use alloc::{
string::{String, ToString},
vec::Vec,
};
use core::{fmt::Debug, time::Duration}; use core::{fmt::Debug, time::Duration};
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
@ -256,11 +259,13 @@ where
} }
/// Get a list ref /// Get a list ref
#[must_use]
pub fn list(&self) -> &Vec<T> { pub fn list(&self) -> &Vec<T> {
self.list.as_ref() self.list.as_ref()
} }
/// Get a list mut /// Get a list mut
#[must_use]
pub fn list_mut(&mut self) -> &mut Vec<T> { pub fn list_mut(&mut self) -> &mut Vec<T> {
self.list.as_mut() self.list.as_mut()
} }