From 171c176833c197bfd1b266940bd2a8c3d4d52cd5 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 15 Oct 2018 19:55:32 +0300 Subject: Run cargo fix --- crates/ra_syntax/src/yellow/builder.rs | 2 +- crates/ra_syntax/src/yellow/mod.rs | 14 +++++++------- crates/ra_syntax/src/yellow/syntax_text.rs | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'crates/ra_syntax/src/yellow') diff --git a/crates/ra_syntax/src/yellow/builder.rs b/crates/ra_syntax/src/yellow/builder.rs index c307b2bd0..67a1a382b 100644 --- a/crates/ra_syntax/src/yellow/builder.rs +++ b/crates/ra_syntax/src/yellow/builder.rs @@ -1,5 +1,5 @@ use rowan::GreenNodeBuilder; -use { +use crate::{ TextUnit, SmolStr, parser_impl::Sink, yellow::{GreenNode, SyntaxError, RaTypes}, diff --git a/crates/ra_syntax/src/yellow/mod.rs b/crates/ra_syntax/src/yellow/mod.rs index 710320f47..ab9bca0f0 100644 --- a/crates/ra_syntax/src/yellow/mod.rs +++ b/crates/ra_syntax/src/yellow/mod.rs @@ -6,7 +6,7 @@ use std::{ hash::{Hash, Hasher}, }; use rowan::Types; -use {SyntaxKind, TextUnit, TextRange, SmolStr}; +use crate::{SyntaxKind, TextUnit, TextRange, SmolStr}; use self::syntax_text::SyntaxText; pub use rowan::{TreeRoot}; @@ -70,16 +70,16 @@ impl<'a> SyntaxNodeRef<'a> { self.0.leaf_text() } pub fn ancestors(self) -> impl Iterator> { - ::algo::generate(Some(self), |&node| node.parent()) + crate::algo::generate(Some(self), |&node| node.parent()) } pub fn descendants(self) -> impl Iterator> { - ::algo::walk::walk(self).filter_map(|event| match event { - ::algo::walk::WalkEvent::Enter(node) => Some(node), - ::algo::walk::WalkEvent::Exit(_) => None, + crate::algo::walk::walk(self).filter_map(|event| match event { + crate::algo::walk::WalkEvent::Enter(node) => Some(node), + crate::algo::walk::WalkEvent::Exit(_) => None, }) } pub fn siblings(self, direction: Direction) -> impl Iterator> { - ::algo::generate(Some(self), move |&node| match direction { + crate::algo::generate(Some(self), move |&node| match direction { Direction::Next => node.next_sibling(), Direction::Prev => node.prev_sibling(), }) @@ -156,7 +156,7 @@ impl> Iterator for SyntaxNodeChildren { fn has_short_text(kind: SyntaxKind) -> bool { - use SyntaxKind::*; + use crate::SyntaxKind::*; match kind { IDENT | LIFETIME | INT_NUMBER | FLOAT_NUMBER => true, _ => false, diff --git a/crates/ra_syntax/src/yellow/syntax_text.rs b/crates/ra_syntax/src/yellow/syntax_text.rs index 0db1049de..ae33b993d 100644 --- a/crates/ra_syntax/src/yellow/syntax_text.rs +++ b/crates/ra_syntax/src/yellow/syntax_text.rs @@ -2,7 +2,7 @@ use std::{ fmt, ops, }; -use { +use crate::{ SyntaxNodeRef, TextRange, TextUnit, text_utils::{intersect, contains_offset_nonstrict}, }; -- cgit v1.2.3