From 263401bf751c66fadd4e9a46cce29dd724cc0985 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 15 Jan 2020 17:44:12 +0100 Subject: Rename --- crates/ra_hir_def/src/path.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'crates/ra_hir_def/src/path.rs') diff --git a/crates/ra_hir_def/src/path.rs b/crates/ra_hir_def/src/path.rs index 9f93a5424..ab290e2c9 100644 --- a/crates/ra_hir_def/src/path.rs +++ b/crates/ra_hir_def/src/path.rs @@ -39,10 +39,7 @@ impl ModPath { lower::lower_path(path, hygiene).map(|it| it.mod_path) } - pub fn from_simple_segments( - kind: PathKind, - segments: impl IntoIterator, - ) -> ModPath { + pub fn from_segments(kind: PathKind, segments: impl IntoIterator) -> ModPath { let segments = segments.into_iter().collect::>(); ModPath { kind, segments } } @@ -240,7 +237,7 @@ impl From for Path { fn from(name: Name) -> Path { Path { type_anchor: None, - mod_path: ModPath::from_simple_segments(PathKind::Plain, iter::once(name)), + mod_path: ModPath::from_segments(PathKind::Plain, iter::once(name)), generic_args: vec![None], } } @@ -248,7 +245,7 @@ impl From for Path { impl From for ModPath { fn from(name: Name) -> ModPath { - ModPath::from_simple_segments(PathKind::Plain, iter::once(name)) + ModPath::from_segments(PathKind::Plain, iter::once(name)) } } @@ -311,7 +308,7 @@ macro_rules! __known_path { macro_rules! __path { ($start:ident $(:: $seg:ident)*) => ({ $crate::__known_path!($start $(:: $seg)*); - $crate::path::ModPath::from_simple_segments($crate::path::PathKind::Abs, vec![ + $crate::path::ModPath::from_segments($crate::path::PathKind::Abs, vec![ $crate::path::__name![$start], $($crate::path::__name![$seg],)* ]) }); -- cgit v1.2.3