1
0
Fork 0

Fix formatting in formatters.rs

Rustfmt changed the way it formats this a while back.
This commit is contained in:
Robbert van der Helm 2023-04-07 13:33:39 +02:00
parent 699c2b99f9
commit 2187aa96ab

View file

@ -114,7 +114,10 @@ pub fn v2s_f32_panning() -> Arc<dyn Fn(f32) -> String + Send + Sync> {
pub fn s2v_f32_panning() -> Arc<dyn Fn(&str) -> Option<f32> + Send + Sync> {
Arc::new(|string| {
let string = string.trim();
let cleaned_string = string.trim_end_matches(&[' ', 'l', 'L', 'c', 'C', 'r', 'R']).parse().ok();
let cleaned_string = string
.trim_end_matches(&[' ', 'l', 'L', 'c', 'C', 'r', 'R'])
.parse()
.ok();
match string.chars().last()?.to_uppercase().next()? {
'L' => cleaned_string.map(|x: f32| x / -100.0),
'C' => Some(0.0),