From 78092c7c66a665ada55ea09476a387014f6665b0 Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Wed, 5 Feb 2020 12:47:28 +0200 Subject: Apply the reviews suggestions --- crates/ra_ide/src/mock_analysis.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'crates/ra_ide/src/mock_analysis.rs') diff --git a/crates/ra_ide/src/mock_analysis.rs b/crates/ra_ide/src/mock_analysis.rs index bf8a54932..081aaee8c 100644 --- a/crates/ra_ide/src/mock_analysis.rs +++ b/crates/ra_ide/src/mock_analysis.rs @@ -3,7 +3,7 @@ use std::sync::Arc; use ra_cfg::CfgOptions; -use ra_db::{Env, RelativePathBuf}; +use ra_db::{CrateName, Env, RelativePathBuf}; use test_utils::{extract_offset, extract_range, parse_fixture, CURSOR_MARKER}; use crate::{ @@ -107,7 +107,9 @@ impl MockAnalysis { crate_graph.add_crate_root(file_id, Edition2018, cfg_options, Env::default()); let crate_name = path.parent().unwrap().file_name().unwrap(); if let Some(root_crate) = root_crate { - crate_graph.add_dep(root_crate, crate_name.into(), other_crate).unwrap(); + crate_graph + .add_dep(root_crate, CrateName::new(crate_name).unwrap(), other_crate) + .unwrap(); } } change.add_file(source_root, file_id, path, Arc::new(contents)); -- cgit v1.2.3