mirror of https://github.com/ndarilek/tts-rs.git
Clippy and fmt.
This commit is contained in:
parent
fc44a8af46
commit
f4b4ba5184
|
@ -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)
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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,
|
||||||
|
|
|
@ -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)))
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue