Fix clippy warnings
This commit is contained in:
parent
e3adc35221
commit
467a98af43
2 changed files with 3 additions and 8 deletions
src/db
|
@ -22,7 +22,7 @@ mod period_format {
|
|||
use chrono::NaiveTime;
|
||||
use serde::{self, Deserialize, Deserializer, Serializer};
|
||||
|
||||
const FORMAT: &'static str = "%H:%M";
|
||||
const FORMAT: &str = "%H:%M";
|
||||
|
||||
pub fn serialize<S>(time: &NaiveTime, serializer: S) -> Result<S::Ok, S::Error>
|
||||
where
|
||||
|
@ -64,7 +64,7 @@ impl FromSql<Binary, Sqlite> for Periods {
|
|||
let start_val_h: u32 = blob[i - 3] as u32;
|
||||
let start_val_m: u32 = blob[i - 2] as u32;
|
||||
let end_val_h: u32 = blob[i - 1] as u32;
|
||||
let end_val_m: u32 = blob[i - 0] as u32;
|
||||
let end_val_m: u32 = blob[i] as u32;
|
||||
vec.push(Period {
|
||||
start: NaiveTime::from_hms(start_val_h, start_val_m, 0),
|
||||
end: NaiveTime::from_hms(end_val_h, end_val_m, 0),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue