Fix Clippy warnings.

This commit is contained in:
Nolan Darilek 2021-03-12 05:48:14 -06:00
parent 2bd324b08b
commit a22ee53727
2 changed files with 3 additions and 3 deletions

View File

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

View File

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