From f4b4ba51849eecb889cf29fb6554cd5a93ca3f93 Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Mon, 23 Dec 2019 07:37:48 -0600 Subject: [PATCH] Clippy and fmt. --- src/backends/speech_dispatcher.rs | 2 +- src/backends/tolk.rs | 2 +- src/backends/web.rs | 2 +- src/lib.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/backends/speech_dispatcher.rs b/src/backends/speech_dispatcher.rs index 08b7b73..cf6a4bb 100644 --- a/src/backends/speech_dispatcher.rs +++ b/src/backends/speech_dispatcher.rs @@ -9,7 +9,7 @@ use crate::{Backend, Error, Features}; pub struct SpeechDispatcher(Connection); impl SpeechDispatcher { - pub fn new() -> impl Backend { + pub fn new() -> Self { info!("Initializing SpeechDispatcher backend"); let connection = speech_dispatcher::Connection::open("tts", "tts", "tts", Mode::Single); SpeechDispatcher(connection) diff --git a/src/backends/tolk.rs b/src/backends/tolk.rs index 9e4d6b9..e97520e 100644 --- a/src/backends/tolk.rs +++ b/src/backends/tolk.rs @@ -7,7 +7,7 @@ use crate::{Backend, Error, Features}; pub struct Tolk(TolkPtr); impl Tolk { - pub fn new() -> impl Backend { + pub fn new() -> Self { info!("Initializing Tolk backend"); let tolk = TolkPtr::new(); tolk.try_sapi(true); diff --git a/src/backends/web.rs b/src/backends/web.rs index 554bc2f..37eb29b 100644 --- a/src/backends/web.rs +++ b/src/backends/web.rs @@ -13,7 +13,7 @@ pub struct Web { } impl Web { - pub fn new() -> Result { + pub fn new() -> Result { info!("Initializing Web backend"); Ok(Web { rate: 25, diff --git a/src/lib.rs b/src/lib.rs index c766b73..8fcdba3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -81,7 +81,7 @@ impl TTS { Backends::Tolk => { let tts = backends::Tolk::new(); Ok(TTS(Box::new(tts))) - }, + } } }