From 09b72489dd085dadce94b454408d18a36abb1681 Mon Sep 17 00:00:00 2001 From: Muhammad Mominul Huque Date: Mon, 8 Jul 2019 04:09:35 +0600 Subject: cargo format --- crates/ra_hir/src/code_model.rs | 5 ++++- crates/ra_hir/src/generics.rs | 6 +----- crates/ra_hir/src/name.rs | 3 ++- crates/ra_hir/src/nameres.rs | 4 ++-- crates/ra_hir/src/nameres/collector.rs | 4 ++-- crates/ra_hir/src/ty/infer.rs | 6 +++--- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs index 8922163ad..805357662 100644 --- a/crates/ra_hir/src/code_model.rs +++ b/crates/ra_hir/src/code_model.rs @@ -19,7 +19,10 @@ use crate::{ TypeAliasId, }, impl_block::ImplBlock, - name::{BOOL, CHAR, F32, F64, I128, I16, I32, I64, I8, ISIZE, STR, U128, U16, U32, U64, U8, USIZE, SELF_TYPE}, + name::{ + BOOL, CHAR, F32, F64, I128, I16, I32, I64, I8, ISIZE, SELF_TYPE, STR, U128, U16, U32, U64, + U8, USIZE, + }, nameres::{CrateModuleId, ImportId, ModuleScope, Namespace}, resolve::Resolver, traits::{TraitData, TraitItem}, diff --git a/crates/ra_hir/src/generics.rs b/crates/ra_hir/src/generics.rs index 3ad2c551a..07a59193f 100644 --- a/crates/ra_hir/src/generics.rs +++ b/crates/ra_hir/src/generics.rs @@ -82,11 +82,7 @@ impl GenericParams { GenericDef::Enum(it) => generics.fill(&*it.source(db).ast, start), GenericDef::Trait(it) => { // traits get the Self type as an implicit first type parameter - generics.params.push(GenericParam { - idx: start, - name: SELF_TYPE, - default: None, - }); + generics.params.push(GenericParam { idx: start, name: SELF_TYPE, default: None }); generics.fill(&*it.source(db).ast, start + 1); } GenericDef::TypeAlias(it) => generics.fill(&*it.source(db).ast, start), diff --git a/crates/ra_hir/src/name.rs b/crates/ra_hir/src/name.rs index 718795314..5f64b7759 100644 --- a/crates/ra_hir/src/name.rs +++ b/crates/ra_hir/src/name.rs @@ -112,7 +112,8 @@ pub(crate) const SELF_TYPE: Name = Name::new(SmolStr::new_inline_from_ascii(4, b pub(crate) const MACRO_RULES: Name = Name::new(SmolStr::new_inline_from_ascii(11, b"macro_rules")); pub(crate) const STD: Name = Name::new(SmolStr::new_inline_from_ascii(3, b"std")); pub(crate) const ITER: Name = Name::new(SmolStr::new_inline_from_ascii(4, b"iter")); -pub(crate) const INTO_ITERATOR: Name = Name::new(SmolStr::new_inline_from_ascii(12, b"IntoIterator")); +pub(crate) const INTO_ITERATOR: Name = + Name::new(SmolStr::new_inline_from_ascii(12, b"IntoIterator")); pub(crate) const ITEM: Name = Name::new(SmolStr::new_inline_from_ascii(4, b"Item")); fn resolve_name(text: &SmolStr) -> SmolStr { diff --git a/crates/ra_hir/src/nameres.rs b/crates/ra_hir/src/nameres.rs index 4c5623063..bbdc606cd 100644 --- a/crates/ra_hir/src/nameres.rs +++ b/crates/ra_hir/src/nameres.rs @@ -65,8 +65,8 @@ use test_utils::tested_by; use crate::{ diagnostics::DiagnosticSink, either::Either, ids::MacroDefId, - nameres::diagnostics::DefDiagnostic, AstDatabase, AstId, BuiltinType, Crate, - DefDatabase, HirFileId, MacroDef, Module, ModuleDef, Name, Path, PathKind, Trait, + nameres::diagnostics::DefDiagnostic, AstDatabase, AstId, BuiltinType, Crate, DefDatabase, + HirFileId, MacroDef, Module, ModuleDef, Name, Path, PathKind, Trait, }; pub(crate) use self::raw::{ImportSourceMap, RawItems}; diff --git a/crates/ra_hir/src/nameres/collector.rs b/crates/ra_hir/src/nameres/collector.rs index 1c3b453bd..552a1b6d9 100644 --- a/crates/ra_hir/src/nameres/collector.rs +++ b/crates/ra_hir/src/nameres/collector.rs @@ -13,8 +13,8 @@ use crate::{ diagnostics::DefDiagnostic, raw, CrateDefMap, CrateModuleId, ItemOrMacro, ModuleData, ModuleDef, PerNs, ReachedFixedPoint, Resolution, ResolveMode, }, - AstId, Const, DefDatabase, Enum, Function, HirFileId, MacroDef, Module, Name, Path, - Static, Struct, Trait, TypeAlias, Union, + AstId, Const, DefDatabase, Enum, Function, HirFileId, MacroDef, Module, Name, Path, Static, + Struct, Trait, TypeAlias, Union, }; pub(super) fn collect_defs(db: &impl DefDatabase, mut def_map: CrateDefMap) -> CrateDefMap { diff --git a/crates/ra_hir/src/ty/infer.rs b/crates/ra_hir/src/ty/infer.rs index 41980a325..52a49070a 100644 --- a/crates/ra_hir/src/ty/infer.rs +++ b/crates/ra_hir/src/ty/infer.rs @@ -40,7 +40,7 @@ use crate::{ PatId, Statement, UnaryOp, }, generics::{GenericParams, HasGenericParams}, - name::{SELF_TYPE, INTO_ITERATOR, ITEM, ITER, STD}, + name::{INTO_ITERATOR, ITEM, ITER, SELF_TYPE, STD}, nameres::{Namespace, PerNs}, path::{GenericArg, GenericArgs, PathKind, PathSegment}, resolve::{ @@ -49,8 +49,8 @@ use crate::{ }, ty::infer::diagnostics::InferenceDiagnostic, type_ref::{Mutability, TypeRef}, - AdtDef, ConstData, DefWithBody, FnData, Function, HirDatabase, ImplItem, - ModuleDef, Name, Path, StructField, + AdtDef, ConstData, DefWithBody, FnData, Function, HirDatabase, ImplItem, ModuleDef, Name, Path, + StructField, }; mod unify; -- cgit v1.2.3