Updates some dependencies #52
|
|
@ -5,20 +5,16 @@ edition = "2021"
|
|||
|
||||
[dependencies]
|
||||
poise = "0.6.1"
|
||||
poise_macros = "0.6.1"
|
||||
tokio = { version = "1.41.0", features = ["rt-multi-thread"] }
|
||||
chrono = { version = "0.4.38", features = ["serde"] }
|
||||
human_ids = "0.1.1"
|
||||
once_cell = { version = "1.20.2", features = ["std"] }
|
||||
serde = { version = "1.0.214", features = ["alloc", "derive"] }
|
||||
thiserror = "1.0.65"
|
||||
tracing = { version = "0.1.40", features = ["async-await", "std"] }
|
||||
simplelog = { version = "0.12.2", features = ["paris"] }
|
||||
log = { version = "0.4.22", features = ["std"] }
|
||||
nom = "7.1.3"
|
||||
criterion = "0.5"
|
||||
serde_json = { version = "1.0.132", features = ["alloc"] }
|
||||
postcard = { version = "1.0.10", features = ["alloc"] }
|
||||
ron = "0.8.1"
|
||||
distance = "0.4.0"
|
||||
|
||||
|
|
|
|||
|
|
@ -94,6 +94,7 @@ impl GlobalConfig {
|
|||
}
|
||||
|
||||
/// Generate the custom emote variant of the reactions
|
||||
#[cfg(not(tarpaulin_include))]
|
||||
fn emotes() -> WeeklyReactionList {
|
||||
vec![
|
||||
ReactionType::Custom {
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@ pub fn add_pending_event(
|
|||
.pending_events
|
||||
.lock()
|
||||
.unwrap()
|
||||
// .map_err(|_| IdleError::MutexError)?
|
||||
.add_pending_event(event)
|
||||
}
|
||||
|
||||
|
|
@ -64,12 +63,7 @@ pub fn add_pending_event(
|
|||
/// make_into_ongoing_event(&id, &ev_ctx).unwrap()
|
||||
/// ```
|
||||
pub fn make_into_ongoing_event(huid: &EventIdType, ev_ctx: &EventHolder) -> Result<(), IdleError> {
|
||||
ev_ctx
|
||||
.pending_events
|
||||
.lock()
|
||||
.unwrap()
|
||||
// .map_err(|_| IdleError::MutexError)?
|
||||
.launch(huid, ev_ctx)
|
||||
ev_ctx.pending_events.lock().unwrap().launch(huid, ev_ctx)
|
||||
}
|
||||
|
||||
/// Manually adds an ongoing event.
|
||||
|
|
@ -100,7 +94,6 @@ pub fn add_ongoing_event(
|
|||
.ongoing_events
|
||||
.lock()
|
||||
.unwrap()
|
||||
// .map_err(|_| IdleError::MutexError)?
|
||||
.add_event(huid, event)?;
|
||||
Ok(())
|
||||
}
|
||||
|
|
@ -126,12 +119,7 @@ pub fn del_ongoing_event(
|
|||
huid: &EventIdType,
|
||||
ev_ctx: &EventHolder,
|
||||
) -> Result<EventOngoing, IdleError> {
|
||||
ev_ctx
|
||||
.ongoing_events
|
||||
.lock()
|
||||
.unwrap()
|
||||
// .map_err(|_| IdleError::MutexError)?
|
||||
.del_event(huid)
|
||||
ev_ctx.ongoing_events.lock().unwrap().del_event(huid)
|
||||
}
|
||||
|
||||
/// Destroy a pending event without closing it
|
||||
|
|
@ -153,12 +141,7 @@ pub fn del_pending_event(
|
|||
huid: &EventIdType,
|
||||
ev_ctx: &EventHolder,
|
||||
) -> Result<EventPending, IdleError> {
|
||||
ev_ctx
|
||||
.pending_events
|
||||
.lock()
|
||||
.unwrap()
|
||||
// .map_err(|_| IdleError::MutexError)?
|
||||
.del_event(huid)
|
||||
ev_ctx.pending_events.lock().unwrap().del_event(huid)
|
||||
}
|
||||
|
||||
/// This function is used to close an ongoing event and return the parsed vote associated with it. If the closure is successful, the owned event is returned for post-treatment.
|
||||
|
|
@ -181,7 +164,6 @@ pub fn close_ongoing_event(huid: &EventIdType, ev_ctx: &EventHolder) -> Result<(
|
|||
.ongoing_events
|
||||
.lock()
|
||||
.unwrap()
|
||||
// .map_err(|_| IdleError::MutexError)?
|
||||
.close_event(huid, ev_ctx)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue