mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-14 10:32:19 +00:00
Remove some anyhow dependencies
This commit is contained in:
@@ -29,8 +29,7 @@ pub async fn route_post<A: AddressbookStore, S: SubscriptionStore>(
|
||||
let sub_id = uuid::Uuid::new_v4().to_string();
|
||||
|
||||
let expires = if let Some(expires) = request.expires {
|
||||
chrono::DateTime::parse_from_rfc2822(&expires)
|
||||
.map_err(|err| crate::Error::Other(err.into()))?
|
||||
chrono::DateTime::parse_from_rfc2822(&expires).map_err(Error::from)?
|
||||
} else {
|
||||
chrono::Utc::now().fixed_offset() + chrono::Duration::weeks(1)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user