mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Implement FromStr for enum Edition
This commit is contained in:
parent
f5e1b0f97c
commit
b69738590c
3 changed files with 14 additions and 8 deletions
|
@ -1,5 +1,6 @@
|
|||
//! FIXME: write short doc here
|
||||
|
||||
use std::str::FromStr;
|
||||
use std::sync::Arc;
|
||||
|
||||
use ra_cfg::CfgOptions;
|
||||
|
@ -164,7 +165,7 @@ fn parse_meta(meta: &str) -> ParsedMeta {
|
|||
match key {
|
||||
"crate" => krate = Some(value.to_string()),
|
||||
"deps" => deps = value.split(',').map(|it| it.to_string()).collect(),
|
||||
"edition" => edition = Edition::from_string(&value),
|
||||
"edition" => edition = Edition::from_str(&value).unwrap(),
|
||||
"cfg" => {
|
||||
for key in value.split(',') {
|
||||
match split1(key, '=') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue