diff options
Diffstat (limited to 'src/abook.rs')
-rw-r--r-- | src/abook.rs | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/abook.rs b/src/abook.rs index 5f34ff5..40ef5a4 100644 --- a/src/abook.rs +++ b/src/abook.rs @@ -20,16 +20,14 @@ use crate::{ }; -pub struct AbookFetcher<'a> { - client: &'a Client, -} +pub struct Abook; -impl<'a> AbookFetcher<'a> { - pub fn new(client: &'a Client) -> AbookFetcher<'a> { - AbookFetcher { client } - } +pub fn abook() -> Abook { + Abook {} +} - pub fn fetch(&self) -> Result<String, Error> { - self.client.fetch_stream("abook", &()) +impl Abook { + pub fn fetch(&self, client: &Client) -> Result<String, Error> { + client.fetch_stream("abook", &()) } } |