Fix build under rust stable

This commit is contained in:
Ilya Zlobintsev
2021-02-07 22:45:28 +02:00
parent d608d6a7ba
commit 11b9844f9a

View File

@@ -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);
}