Refactor to cfg! where possible.

This commit is contained in:
Nolan Darilek 2020-06-11 13:11:09 -05:00
parent d115470c0d
commit a4c61a421f

View File

@ -82,9 +82,11 @@ impl TTS {
builder builder
.add_property("can_detect_screen_reader") .add_property("can_detect_screen_reader")
.with_getter(|_: &TTS, _| { .with_getter(|_: &TTS, _| {
#[cfg(windows)] if cfg!(windows) {
return true; true
return false; } else {
false
}
}) })
.done(); .done();
builder builder
@ -95,7 +97,7 @@ impl TTS {
let tolk = tolk::Tolk::new(); let tolk = tolk::Tolk::new();
return tolk.detect_screen_reader().is_some(); return tolk.detect_screen_reader().is_some();
} }
return false; false
}) })
.done(); .done();
builder builder