From 2a9c4ba8e9cf2836ee1288019782ba151f7aba50 Mon Sep 17 00:00:00 2001 From: Yuki Kishimoto Date: Wed, 23 Nov 2022 10:21:46 +0100 Subject: [PATCH] Small improvements --- src/dispatcher/auth.rs | 1 + src/dispatcher/builder.rs | 1 + src/dispatcher/mod.rs | 2 +- src/lib.rs | 3 +++ 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/dispatcher/auth.rs b/src/dispatcher/auth.rs index 531c7cc..2a520c1 100644 --- a/src/dispatcher/auth.rs +++ b/src/dispatcher/auth.rs @@ -1,6 +1,7 @@ // Copyright (c) 2022 Yuki Kishimoto // Distributed under the MIT software license +#[derive(Clone)] pub struct Auth { username: String, password: String, diff --git a/src/dispatcher/builder.rs b/src/dispatcher/builder.rs index 1f6e4ca..544d080 100644 --- a/src/dispatcher/builder.rs +++ b/src/dispatcher/builder.rs @@ -10,6 +10,7 @@ use url::Url; use super::{Auth, Dispatcher}; use crate::error::NtfyError; +#[derive(Clone)] pub struct DispatcherBuilder { url: String, auth: Option, diff --git a/src/dispatcher/mod.rs b/src/dispatcher/mod.rs index 501d607..ba69456 100644 --- a/src/dispatcher/mod.rs +++ b/src/dispatcher/mod.rs @@ -24,7 +24,7 @@ pub struct Dispatcher { impl Dispatcher { /// Create new dispatcher - pub fn new(url: S, auth: Option, proxy: Option<&str>) -> Result + pub fn new(url: S, auth: Option, proxy: Option) -> Result where S: Into, { diff --git a/src/lib.rs b/src/lib.rs index 10ba6e4..6626df7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,6 +6,9 @@ #[macro_use] extern crate serde; +pub use chrono::{Duration, Local}; +pub use url::Url; + pub mod dispatcher; pub mod error; mod net;