Fix Clippy warnings.

pull/11/head
Nolan Darilek 2 years ago
parent 2bd324b08b
commit a22ee53727
  1. 2
      src/backends/av_foundation.rs
  2. 4
      src/lib.rs

@ -116,7 +116,7 @@ impl AvFoundation {
AvFoundation {
id: BackendId::AvFoundation(*backend_id),
delegate: delegate_obj,
synth: synth,
synth,
rate: 0.5,
volume: 1.,
pitch: 1.,

@ -243,9 +243,9 @@ impl TTS {
let str: *const c_char = msg_send![version, UTF8String];
let str = CStr::from_ptr(str);
let str = str.to_string_lossy();
let version: Vec<&str> = str.split(" ").collect();
let version: Vec<&str> = str.split(' ').collect();
let version = version[1];
let version_parts: Vec<&str> = version.split(".").collect();
let version_parts: Vec<&str> = version.split('.').collect();
let major_version: i8 = version_parts[0].parse().unwrap();
let minor_version: i8 = version_parts[1].parse().unwrap();
if major_version >= 11 || minor_version >= 14 {

Loading…
Cancel
Save