Skip to content

Commit

Permalink
chore(notifications): add allow(dead_code) to specific fn's
Browse files Browse the repository at this point in the history
  • Loading branch information
thevaibhav-dixit committed Jan 29, 2024
1 parent a95c95e commit 7153ad1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions core/notifications/src/executor/novu/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ impl Client {
}
}

#[allow(dead_code)]
pub async fn delete<T: DeserializeOwned>(
&self,
endpoint: impl ToString,
Expand Down Expand Up @@ -119,6 +120,7 @@ impl Client {
}
}

#[allow(dead_code)]
pub async fn patch<T: DeserializeOwned>(
&self,
endpoint: impl ToString,
Expand Down
5 changes: 5 additions & 0 deletions core/notifications/src/executor/novu/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ pub struct TriggerRecipient {
}

impl TriggerRecipient {
#[allow(dead_code)]
pub fn builder() -> TriggerRecipientBuilder {
TriggerRecipientBuilder::default()
}
Expand All @@ -62,11 +63,13 @@ impl TriggerRecipientBuilder {
}
}

#[allow(dead_code)]
pub fn first_name(mut self, name: impl ToString) -> TriggerRecipientBuilder {
self.recipient.first_name = Some(name.to_string());
self
}

#[allow(dead_code)]
pub fn last_name(mut self, name: impl ToString) -> TriggerRecipientBuilder {
self.recipient.last_name = Some(name.to_string());
self
Expand All @@ -77,11 +80,13 @@ impl TriggerRecipientBuilder {
self
}

#[allow(dead_code)]
pub fn phone_number(mut self, phone_number: impl ToString) -> TriggerRecipientBuilder {
self.recipient.phone_number = Some(phone_number.to_string());
self
}

#[allow(dead_code)]
pub fn avatar_url(mut self, avatar_url: impl ToString) -> TriggerRecipientBuilder {
self.recipient.avatar_url = Some(avatar_url.to_string());
self
Expand Down
2 changes: 0 additions & 2 deletions core/notifications/src/executor/novu/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![allow(dead_code)]

pub mod client;
pub mod error;
pub mod events;
Expand Down
3 changes: 3 additions & 0 deletions core/notifications/src/executor/novu/subscriber.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ impl Subscribers {
Self { client }
}

#[allow(dead_code)]
pub async fn list(&self, page: i32) -> Result<SubscribersResponse, NovuError> {
let endpoint = format!("/subscribers/?page={}", page);
let result: Response<SubscribersResponse> = self.client.get(endpoint).await?;
Expand All @@ -234,6 +235,7 @@ impl Subscribers {
}
}

#[allow(dead_code)]
pub async fn get(&self, subscriber_id: String) -> Result<GetSubscriberResponse, NovuError> {
let endpoint = format!("/subscribers/{}", subscriber_id);
let result = self.client.get(endpoint).await?;
Expand All @@ -251,6 +253,7 @@ impl Subscribers {
}
}

#[allow(dead_code)]
pub async fn update(
&self,
subscriber_id: String,
Expand Down

0 comments on commit 7153ad1

Please sign in to comment.