From ff687453a8a80da29ee7b0b4ad71871ff8b0523e Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 23 Jun 2020 21:29:50 +0200 Subject: Slightly better name --- crates/test_utils/src/fixture.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/test_utils/src/fixture.rs') diff --git a/crates/test_utils/src/fixture.rs b/crates/test_utils/src/fixture.rs index 9108e49d9..0cd51ab3e 100644 --- a/crates/test_utils/src/fixture.rs +++ b/crates/test_utils/src/fixture.rs @@ -2,7 +2,7 @@ //! rust-analyzer database from a single string. use rustc_hash::FxHashMap; -use stdx::split1; +use stdx::split_delim; #[derive(Debug, Eq, PartialEq)] pub struct Fixture { @@ -81,14 +81,14 @@ The offending line: {:?}"#, let mut cfg_key_values = Vec::new(); let mut env = FxHashMap::default(); for component in components[1..].iter() { - let (key, value) = split1(component, ':').unwrap(); + let (key, value) = split_delim(component, ':').unwrap(); match key { "crate" => krate = Some(value.to_string()), "deps" => deps = value.split(',').map(|it| it.to_string()).collect(), "edition" => edition = Some(value.to_string()), "cfg" => { for entry in value.split(',') { - match split1(entry, '=') { + match split_delim(entry, '=') { Some((k, v)) => cfg_key_values.push((k.to_string(), v.to_string())), None => cfg_atoms.push(entry.to_string()), } @@ -96,7 +96,7 @@ The offending line: {:?}"#, } "env" => { for key in value.split(',') { - if let Some((k, v)) = split1(key, '=') { + if let Some((k, v)) = split_delim(key, '=') { env.insert(k.into(), v.into()); } } -- cgit v1.2.3