mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-14 16:32:29 +00:00
clippy appeasement
This commit is contained in:
@@ -59,7 +59,7 @@ impl<S: SubscriptionStore> DavPushController<S> {
|
|||||||
let mut latest_messages = HashMap::new();
|
let mut latest_messages = HashMap::new();
|
||||||
for message in messages {
|
for message in messages {
|
||||||
if matches!(message.data, CollectionOperationInfo::Content { .. }) {
|
if matches!(message.data, CollectionOperationInfo::Content { .. }) {
|
||||||
latest_messages.insert(message.topic.to_string(), message);
|
latest_messages.insert(message.topic.clone(), message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let messages = latest_messages.into_values();
|
let messages = latest_messages.into_values();
|
||||||
@@ -156,12 +156,13 @@ impl<S: SubscriptionStore> DavPushController<S> {
|
|||||||
) -> Result<(), NotifierError> {
|
) -> Result<(), NotifierError> {
|
||||||
if subsciption.public_key_type != "p256dh" {
|
if subsciption.public_key_type != "p256dh" {
|
||||||
return Err(NotifierError::InvalidPublicKeyType(
|
return Err(NotifierError::InvalidPublicKeyType(
|
||||||
subsciption.public_key_type.to_string(),
|
subsciption.public_key_type.clone(),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
let endpoint = subsciption.push_resource.parse().map_err(|_| {
|
let endpoint = subsciption
|
||||||
NotifierError::InvalidEndpointUrl(subsciption.push_resource.to_string())
|
.push_resource
|
||||||
})?;
|
.parse()
|
||||||
|
.map_err(|_| NotifierError::InvalidEndpointUrl(subsciption.push_resource.clone()))?;
|
||||||
let ua_public = base64::engine::general_purpose::URL_SAFE_NO_PAD
|
let ua_public = base64::engine::general_purpose::URL_SAFE_NO_PAD
|
||||||
.decode(&subsciption.public_key)
|
.decode(&subsciption.public_key)
|
||||||
.map_err(|_| NotifierError::InvalidKeyEncoding)?;
|
.map_err(|_| NotifierError::InvalidKeyEncoding)?;
|
||||||
|
|||||||
Reference in New Issue
Block a user