From f2f69e75c84014a6173798e95af0baa48df2607e Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 23 Jun 2020 21:45:40 +0200 Subject: [PATCH] Minor, rename --- crates/ra_db/src/fixture.rs | 2 +- crates/test_utils/src/fixture.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/ra_db/src/fixture.rs b/crates/ra_db/src/fixture.rs index 20f2915683..3959d7efe6 100644 --- a/crates/ra_db/src/fixture.rs +++ b/crates/ra_db/src/fixture.rs @@ -110,7 +110,7 @@ fn with_single_file(db: &mut dyn SourceDatabaseExt, ra_fixture: &str) -> FileId let source_root = SourceRoot::new_local(file_set); let crate_graph = if let Some(meta) = ra_fixture.lines().find(|it| it.contains("//-")) { - let entry = Fixture::parse_single(meta.trim()); + let entry = Fixture::parse_meta_line(meta.trim()); let meta = match ParsedMeta::from(&entry) { ParsedMeta::File(it) => it, }; diff --git a/crates/test_utils/src/fixture.rs b/crates/test_utils/src/fixture.rs index 0cd51ab3ef..ba928bb9c3 100644 --- a/crates/test_utils/src/fixture.rs +++ b/crates/test_utils/src/fixture.rs @@ -55,7 +55,7 @@ The offending line: {:?}"#, let mut res: Vec = Vec::new(); for line in lines.by_ref() { if line.starts_with("//-") { - let meta = Fixture::parse_single(line); + let meta = Fixture::parse_meta_line(line); res.push(meta) } else if let Some(entry) = res.last_mut() { entry.text.push_str(line); @@ -66,7 +66,7 @@ The offending line: {:?}"#, } //- /lib.rs crate:foo deps:bar,baz cfg:foo=a,bar=b env:OUTDIR=path/to,OTHER=foo - pub fn parse_single(meta: &str) -> Fixture { + pub fn parse_meta_line(meta: &str) -> Fixture { assert!(meta.starts_with("//-")); let meta = meta["//-".len()..].trim(); let components = meta.split_ascii_whitespace().collect::>();