Skip to content

Commit

Permalink
Clippy clip
Browse files Browse the repository at this point in the history
  • Loading branch information
gferon committed Oct 17, 2024
1 parent 5c99403 commit 23d1a1b
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/account_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ impl AccountManager {
.request(
Method::PUT,
Endpoint::Service,
&format!("/v1/provisioning/{}", destination),
format!("/v1/provisioning/{}", destination),
HttpAuthOverride::NoOverride,
)?
.json(&ProvisioningMessage {
Expand Down
2 changes: 1 addition & 1 deletion src/messagepipe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ impl MessagePipe {
responder
.send(response)
.map_err(|_| ServiceError::WsClosing {
reason: "could not respond to message pipe request".into(),
reason: "could not respond to message pipe request",
})?;

Ok(result)
Expand Down
4 changes: 2 additions & 2 deletions src/push_service/keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl PushService {
self.request(
Method::GET,
Endpoint::Service,
&format!("/v2/keys?identity={}", service_id_type),
format!("/v2/keys?identity={}", service_id_type),
HttpAuthOverride::NoOverride,
)?
.send()
Expand All @@ -53,7 +53,7 @@ impl PushService {
self.request(
Method::PUT,
Endpoint::Service,
&format!("/v2/keys?identity={}", service_id_type),
format!("/v2/keys?identity={}", service_id_type),
HttpAuthOverride::NoOverride,
)?
.json(&pre_key_state)
Expand Down
9 changes: 3 additions & 6 deletions src/push_service/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ impl PushService {
let client = reqwest::ClientBuilder::new()
.add_root_certificate(
reqwest::Certificate::from_pem(
&cfg.certificate_authority.as_bytes(),
cfg.certificate_authority.as_bytes(),
)
.unwrap(),
)
Expand Down Expand Up @@ -332,11 +332,8 @@ mod tests {
let configs = &[SignalServers::Staging, SignalServers::Production];

for cfg in configs {
let _ = super::PushService::new(
cfg,
None,
"libsignal-service test".to_string(),
);
let _ =
super::PushService::new(cfg, None, "libsignal-service test");
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/push_service/registration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ impl PushService {
self.request(
Method::PATCH,
Endpoint::Service,
&format!("/v1/verification/session/{}", session_id),
format!("/v1/verification/session/{}", session_id),
HttpAuthOverride::Unidentified,
)?
.json(&UpdateVerificationSessionRequestBody {
Expand Down Expand Up @@ -290,7 +290,7 @@ impl PushService {
self.request(
Method::POST,
Endpoint::Service,
&format!("/v1/verification/session/{}/code", session_id),
format!("/v1/verification/session/{}/code", session_id),
HttpAuthOverride::Unidentified,
)?
.json(&VerificationCodeRequest { transport, client })
Expand All @@ -316,7 +316,7 @@ impl PushService {
self.request(
Method::PUT,
Endpoint::Service,
&format!("/v1/verification/session/{}/code", session_id),
format!("/v1/verification/session/{}/code", session_id),
HttpAuthOverride::Unidentified,
)?
.json(&VerificationCode {
Expand Down
7 changes: 4 additions & 3 deletions src/websocket/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ impl SignalWebSocketProcess {
tracing::trace!("sending request with body");
self.request_sink.send((request, sink)).await.map_err(
|_| ServiceError::WsClosing {
reason: "request handler failed".into(),
reason: "request handler failed",
},
)?;
self.outgoing_responses.push(Box::pin(recv));
Expand Down Expand Up @@ -197,7 +197,7 @@ impl SignalWebSocketProcess {
push_service::KEEPALIVE_TIMEOUT_SECONDS,
);

Ok(loop {
loop {
futures::select! {
_ = ka_interval.tick().fuse() => {
use prost::Message;
Expand Down Expand Up @@ -309,7 +309,8 @@ impl SignalWebSocketProcess {
}
}
}
})
}
Ok(())
}
}

Expand Down

0 comments on commit 23d1a1b

Please sign in to comment.