docs: add missing #[must_use], # Errors, # Panics across public api
This commit is contained in:
parent
748536203b
commit
908cadb151
10 changed files with 157 additions and 0 deletions
|
|
@ -29,6 +29,7 @@ pub enum Window {
|
|||
}
|
||||
|
||||
impl Window {
|
||||
#[must_use]
|
||||
pub fn parse(s: &str) -> Self {
|
||||
match s {
|
||||
"1h" => Self::Hour,
|
||||
|
|
@ -51,6 +52,7 @@ impl Window {
|
|||
}
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn span_secs(self) -> i64 {
|
||||
match self {
|
||||
Self::Hour => 3600,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue