From d85d56c3eeed548832cf3806b1e23e40e63814db Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Tue, 11 May 2021 23:53:15 -0500 Subject: [PATCH] Bump version to work around Tolk crash. --- Cargo.toml | 4 ++-- src/backends/tolk.rs | 2 +- src/lib.rs | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 496e772..229c438 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tts" -version = "0.17.0" +version = "0.17.1" authors = ["Nolan Darilek "] repository = "https://github.com/ndarilek/tts-rs" description = "High-level Text-To-Speech (TTS) interface" @@ -21,7 +21,7 @@ thiserror = "1" env_logger = "0.8" [target.'cfg(windows)'.dependencies] -tolk = { version = "0.3", optional = true } +tolk = { version = "0.4", optional = true } windows = "0.9" [target.'cfg(windows)'.build-dependencies] diff --git a/src/backends/tolk.rs b/src/backends/tolk.rs index ae16e4f..9b93a5e 100644 --- a/src/backends/tolk.rs +++ b/src/backends/tolk.rs @@ -11,7 +11,7 @@ impl Tolk { pub(crate) fn new() -> Option { info!("Initializing Tolk backend"); let tolk = TolkPtr::new(); - if tolk.detect_screen_reader().is_some() { + if tolk::Tolk::detect_screen_reader().is_some() { Some(Tolk(tolk)) } else { None diff --git a/src/lib.rs b/src/lib.rs index 9b742a7..6c0b5f8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -537,8 +537,7 @@ impl Tts { { #[cfg(feature = "tolk")] { - let tolk = tolk::Tolk::new(); - return tolk.detect_screen_reader().is_some(); + return tolk::Tolk::detect_screen_reader().is_some(); } #[cfg(not(feature = "tolk"))] return false;