chrono crate is no longer required

This commit is contained in:
daladim 2021-03-23 00:15:23 +01:00
parent 3da86bc146
commit bcc8fc705b
3 changed files with 0 additions and 49 deletions

44
Cargo.lock generated
View file

@ -73,20 +73,6 @@ version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "chrono"
version = "0.4.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73"
dependencies = [
"libc",
"num-integer",
"num-traits",
"serde",
"time",
"winapi",
]
[[package]] [[package]]
name = "core-foundation" name = "core-foundation"
version = "0.9.1" version = "0.9.1"
@ -436,7 +422,6 @@ version = "0.1.0"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"bitflags", "bitflags",
"chrono",
"env_logger", "env_logger",
"log", "log",
"minidom", "minidom",
@ -476,25 +461,6 @@ dependencies = [
"winapi", "winapi",
] ]
[[package]]
name = "num-integer"
version = "0.1.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db"
dependencies = [
"autocfg",
"num-traits",
]
[[package]]
name = "num-traits"
version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290"
dependencies = [
"autocfg",
]
[[package]] [[package]]
name = "num_cpus" name = "num_cpus"
version = "1.13.0" version = "1.13.0"
@ -883,16 +849,6 @@ dependencies = [
"once_cell", "once_cell",
] ]
[[package]]
name = "time"
version = "0.1.43"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438"
dependencies = [
"libc",
"winapi",
]
[[package]] [[package]]
name = "tinyvec" name = "tinyvec"
version = "1.1.1" version = "1.1.1"

View file

@ -21,6 +21,5 @@ bitflags = "1.2"
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0" serde_json = "1.0"
async-trait = "0.1" async-trait = "0.1"
chrono = { version = "0.4", features = ["serde"] }
uuid = { version = "0.8", features = ["v4"] } uuid = { version = "0.8", features = ["v4"] }
sanitize-filename = "0.3" sanitize-filename = "0.3"

View file

@ -3,7 +3,6 @@ use std::collections::BTreeMap;
use std::error::Error; use std::error::Error;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use chrono::{DateTime, Utc};
use async_trait::async_trait; use async_trait::async_trait;
use crate::traits::{PartialCalendar, CompleteCalendar}; use crate::traits::{PartialCalendar, CompleteCalendar};
@ -21,7 +20,6 @@ pub struct CachedCalendar {
supported_components: SupportedComponents, supported_components: SupportedComponents,
items: HashMap<ItemId, Item>, items: HashMap<ItemId, Item>,
deleted_items: BTreeMap<DateTime<Utc>, ItemId>,
} }
impl CachedCalendar { impl CachedCalendar {
@ -30,7 +28,6 @@ impl CachedCalendar {
Self { Self {
name, id, supported_components, name, id, supported_components,
items: HashMap::new(), items: HashMap::new(),
deleted_items: BTreeMap::new(),
} }
} }
} }
@ -57,7 +54,6 @@ impl PartialCalendar for CachedCalendar {
if let None = self.items.remove(item_id) { if let None = self.items.remove(item_id) {
return Err("This key does not exist.".into()); return Err("This key does not exist.".into());
} }
self.deleted_items.insert(Utc::now(), item_id.clone());
Ok(()) Ok(())
} }