master
Avril 4 years ago
parent 908c520b35
commit 3f3d8a3045
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -42,25 +42,17 @@ impl Unit
}
#[cfg(not(nightly))]
fn multiplier(&self) -> u64 {
use lazy_static::lazy_static;
use std::collections::HashMap;
fn calc_table(&self) -> {
use Unit::*;
match self {
Second => 1000,
Minute => Second.multiplier() * 60,
Hour => Minute.multiplier() * 60,
Day => Hour.multiplier() * 24,
Week => Day.multiplier() * 7,
Year => Week.multiplier() * 52,
Aeon => Year.multiplier() * 1000000,
}
match self {
Second => 1000,
Minute => Second.multiplier() * 60,
Hour => Minute.multiplier() * 60,
Day => Hour.multiplier() * 24,
Week => Day.multiplier() * 7,
Year => Week.multiplier() * 52,
Aeon => Year.multiplier() * 1000000,
}
*MUL_TABLE.get(&self).unwrap()
}
}
/// A time object parsed from the definition file.

@ -1,2 +1,3 @@
use super::*;
pub mod user;

@ -0,0 +1 @@
//! passwd queries
Loading…
Cancel
Save