From 11b9844f9ab46af340a0d0686fbdcb8aa014e026 Mon Sep 17 00:00:00 2001 From: Ilya Zlobintsev Date: Sun, 7 Feb 2021 22:45:28 +0200 Subject: [PATCH] Fix build under rust stable --- daemon/src/gpu_controller.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/daemon/src/gpu_controller.rs b/daemon/src/gpu_controller.rs index 5ad2f93..347d50d 100644 --- a/daemon/src/gpu_controller.rs +++ b/daemon/src/gpu_controller.rs @@ -634,9 +634,12 @@ impl GpuController { .replace("}", ""); for feature in features_string.split(',') { - let (name, supported) = feature.split_once(':').unwrap(); - let name = name.trim(); - let supported: bool = supported.trim().parse().unwrap(); + // let (name, supported) = feature.split_once(':').unwrap(); Use this once it's in stable + let mut split = feature.split(':'); + let name = split.next().unwrap().trim(); + let supported = split.next().unwrap().trim(); + + let supported: bool = supported.parse().unwrap(); features.insert(name.to_string(), supported); }