Skip to content

Commit

Permalink
Apply suggestions from review
Browse files Browse the repository at this point in the history
  • Loading branch information
threema-donat committed May 14, 2024
1 parent 3d7cdb8 commit a8c260d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub enum PushRelayError {
#[error("Reqwest error: {0}")]
Reqwest(#[from] ReqwestError),

#[error("{reason}: {source}")]
#[error("I/O error: {reason}: {source}")]
IoError {
reason: &'static str,
source: std::io::Error,
Expand Down
5 changes: 1 addition & 4 deletions src/influxdb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,7 @@ impl Influxdb {
}
}

async fn log<B>(&self, body: B) -> InfluxdbResult
where
B: Into<Body>,
{
async fn log(&self, body: impl Into<Body>) -> InfluxdbResult {
let body: Body = body.into();

// Send request
Expand Down
2 changes: 1 addition & 1 deletion src/push/hms.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pub struct HmsStateConfig {
type SharedHmsConfig = Arc<HmsStateConfig>;

impl HmsStateConfig {
pub fn new() -> SharedHmsConfig {
pub fn new_shared() -> SharedHmsConfig {
let login_endpoint = Cow::Borrowed("https://oauth-login.cloud.huawei.com");
let push_endpoint = Cow::Borrowed("https://push-api.cloud.huawei.com");
Arc::new(Self {
Expand Down
2 changes: 1 addition & 1 deletion src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ pub async fn serve(
apns_client_prod: apns_client_prod.clone(),
apns_client_sbox: apns_client_sbox.clone(),
hms_contexts: hms_contexts.clone(),
hms_config: HmsStateConfig::new(),
hms_config: HmsStateConfig::new_shared(),
threema_gateway_client: threema_gateway_client.clone(),
threema_gateway_private_key: threema_gateway_private_key.clone(),
threema_gateway_config: threema_gateway.clone(),
Expand Down

0 comments on commit a8c260d

Please sign in to comment.