From a22ee537275170362173cca65107b6844865007c Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Fri, 12 Mar 2021 05:48:14 -0600 Subject: [PATCH] Fix Clippy warnings. --- src/backends/av_foundation.rs | 2 +- src/lib.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backends/av_foundation.rs b/src/backends/av_foundation.rs index dbca640..a87bf69 100644 --- a/src/backends/av_foundation.rs +++ b/src/backends/av_foundation.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., diff --git a/src/lib.rs b/src/lib.rs index d2b80d1..89a1136 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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 {