Clippy and fmt.

This commit is contained in:
Nolan Darilek 2019-12-23 07:37:48 -06:00
parent fc44a8af46
commit f4b4ba5184
4 changed files with 4 additions and 4 deletions

View File

@ -9,7 +9,7 @@ use crate::{Backend, Error, Features};
pub struct SpeechDispatcher(Connection); pub struct SpeechDispatcher(Connection);
impl SpeechDispatcher { impl SpeechDispatcher {
pub fn new() -> impl Backend { pub fn new() -> Self {
info!("Initializing SpeechDispatcher backend"); info!("Initializing SpeechDispatcher backend");
let connection = speech_dispatcher::Connection::open("tts", "tts", "tts", Mode::Single); let connection = speech_dispatcher::Connection::open("tts", "tts", "tts", Mode::Single);
SpeechDispatcher(connection) SpeechDispatcher(connection)

View File

@ -7,7 +7,7 @@ use crate::{Backend, Error, Features};
pub struct Tolk(TolkPtr); pub struct Tolk(TolkPtr);
impl Tolk { impl Tolk {
pub fn new() -> impl Backend { pub fn new() -> Self {
info!("Initializing Tolk backend"); info!("Initializing Tolk backend");
let tolk = TolkPtr::new(); let tolk = TolkPtr::new();
tolk.try_sapi(true); tolk.try_sapi(true);

View File

@ -13,7 +13,7 @@ pub struct Web {
} }
impl Web { impl Web {
pub fn new() -> Result<impl Backend, Error> { pub fn new() -> Result<Self, Error> {
info!("Initializing Web backend"); info!("Initializing Web backend");
Ok(Web { Ok(Web {
rate: 25, rate: 25,

View File

@ -81,7 +81,7 @@ impl TTS {
Backends::Tolk => { Backends::Tolk => {
let tts = backends::Tolk::new(); let tts = backends::Tolk::new();
Ok(TTS(Box::new(tts))) Ok(TTS(Box::new(tts)))
}, }
} }
} }