mirror of
https://github.com/ndarilek/tts-rs.git
synced 2024-11-17 12:19:37 +00:00
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);
|
||||
|
||||
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)
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -13,7 +13,7 @@ pub struct Web {
|
|||
}
|
||||
|
||||
impl Web {
|
||||
pub fn new() -> Result<impl Backend, Error> {
|
||||
pub fn new() -> Result<Self, Error> {
|
||||
info!("Initializing Web backend");
|
||||
Ok(Web {
|
||||
rate: 25,
|
||||
|
|
|
@ -81,7 +81,7 @@ impl TTS {
|
|||
Backends::Tolk => {
|
||||
let tts = backends::Tolk::new();
|
||||
Ok(TTS(Box::new(tts)))
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user