diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-05-06 18:29:30 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-05-06 18:29:30 +0100 |
commit | b37b709459a4ff881a91965ebf0c39e3a449c304 (patch) | |
tree | 49eba918834c5a4fec5a8d5de39589219c81c846 /crates/project_model | |
parent | 3b4d5df840f1c6a077ad1886a98ef453811a599f (diff) | |
parent | 607d8a2f61e56fabb7a3bc5132592917fcdca970 (diff) |
Merge #8718
8718: 1.52.0 r=SomeoneToIgnore a=matklad
A lot of APIs we use in this release!
Co-authored-by: Aleksey Kladov <[email protected]>
Co-authored-by: Kirill Bulatov <[email protected]>
Diffstat (limited to 'crates/project_model')
-rw-r--r-- | crates/project_model/src/cfg_flag.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/project_model/src/cfg_flag.rs b/crates/project_model/src/cfg_flag.rs index e92962cf6..bfdfd458f 100644 --- a/crates/project_model/src/cfg_flag.rs +++ b/crates/project_model/src/cfg_flag.rs | |||
@@ -4,7 +4,6 @@ | |||
4 | use std::str::FromStr; | 4 | use std::str::FromStr; |
5 | 5 | ||
6 | use cfg::CfgOptions; | 6 | use cfg::CfgOptions; |
7 | use stdx::split_once; | ||
8 | 7 | ||
9 | #[derive(Clone, Eq, PartialEq, Debug)] | 8 | #[derive(Clone, Eq, PartialEq, Debug)] |
10 | pub enum CfgFlag { | 9 | pub enum CfgFlag { |
@@ -15,7 +14,7 @@ pub enum CfgFlag { | |||
15 | impl FromStr for CfgFlag { | 14 | impl FromStr for CfgFlag { |
16 | type Err = String; | 15 | type Err = String; |
17 | fn from_str(s: &str) -> Result<Self, Self::Err> { | 16 | fn from_str(s: &str) -> Result<Self, Self::Err> { |
18 | let res = match split_once(s, '=') { | 17 | let res = match s.split_once('=') { |
19 | Some((key, value)) => { | 18 | Some((key, value)) => { |
20 | if !(value.starts_with('"') && value.ends_with('"')) { | 19 | if !(value.starts_with('"') && value.ends_with('"')) { |
21 | return Err(format!("Invalid cfg ({:?}), value should be in quotes", s)); | 20 | return Err(format!("Invalid cfg ({:?}), value should be in quotes", s)); |