diff --git a/src/dispatcher/builder.rs b/src/dispatcher/builder.rs index 91701b8..c954d4e 100644 --- a/src/dispatcher/builder.rs +++ b/src/dispatcher/builder.rs @@ -50,9 +50,9 @@ impl DispatcherBuilder { #[cfg(not(target_arch = "wasm32"))] pub fn proxy(mut self, proxy: S) -> Self where - S: Into, + S: Into>, { - self.proxy = Some(proxy.into()); + self.proxy = proxy.into(); self } diff --git a/src/payload/mod.rs b/src/payload/mod.rs index 10fa4df..aa3adc3 100644 --- a/src/payload/mod.rs +++ b/src/payload/mod.rs @@ -53,19 +53,20 @@ impl Payload { #[inline] pub fn title(mut self, title: S) -> Self where - S: Into, + S: Into>, { - self.title = Some(title.into()); + self.title = title.into(); self } /// Set tags - pub fn tags(mut self, tags: I) -> Self + pub fn tags(mut self, tags: P) -> Self where I: IntoIterator, S: Into, + P: Into>, { - self.tags = Some(tags.into_iter().map(|t| t.into()).collect()); + self.tags = tags.into().map(|i| i.into_iter().map(Into::into).collect()); self } @@ -77,11 +78,12 @@ impl Payload { } /// Set actions - pub fn actions(mut self, actions: I) -> Self + pub fn actions(mut self, actions: P) -> Self where I: IntoIterator, + P: Into>, { - self.actions = Some(actions.into_iter().collect()); + self.actions = actions.into().map(|i| i.into_iter().collect()); self } @@ -103,9 +105,9 @@ impl Payload { #[inline] pub fn filename(mut self, filename: S) -> Self where - S: Into, + S: Into>, { - self.filename = Some(filename.into()); + self.filename = filename.into(); self } @@ -113,9 +115,9 @@ impl Payload { #[inline] pub fn delay(mut self, delay: S) -> Self where - S: Into, + S: Into>, { - self.delay = Some(delay.into()); + self.delay = delay.into(); self } @@ -123,9 +125,9 @@ impl Payload { #[inline] pub fn email(mut self, email: S) -> Self where - S: Into, + S: Into>, { - self.email = Some(email.into()); + self.email = email.into(); self }