Skip to content

Commit 09b7248

Browse files
committed
cargo format
1 parent 012fec5 commit 09b7248

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

crates/ra_hir/src/code_model.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ use crate::{
1919
TypeAliasId,
2020
},
2121
impl_block::ImplBlock,
22-
name::{BOOL, CHAR, F32, F64, I128, I16, I32, I64, I8, ISIZE, STR, U128, U16, U32, U64, U8, USIZE, SELF_TYPE},
22+
name::{
23+
BOOL, CHAR, F32, F64, I128, I16, I32, I64, I8, ISIZE, SELF_TYPE, STR, U128, U16, U32, U64,
24+
U8, USIZE,
25+
},
2326
nameres::{CrateModuleId, ImportId, ModuleScope, Namespace},
2427
resolve::Resolver,
2528
traits::{TraitData, TraitItem},

crates/ra_hir/src/generics.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,7 @@ impl GenericParams {
8282
GenericDef::Enum(it) => generics.fill(&*it.source(db).ast, start),
8383
GenericDef::Trait(it) => {
8484
// traits get the Self type as an implicit first type parameter
85-
generics.params.push(GenericParam {
86-
idx: start,
87-
name: SELF_TYPE,
88-
default: None,
89-
});
85+
generics.params.push(GenericParam { idx: start, name: SELF_TYPE, default: None });
9086
generics.fill(&*it.source(db).ast, start + 1);
9187
}
9288
GenericDef::TypeAlias(it) => generics.fill(&*it.source(db).ast, start),

crates/ra_hir/src/name.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ pub(crate) const SELF_TYPE: Name = Name::new(SmolStr::new_inline_from_ascii(4, b
112112
pub(crate) const MACRO_RULES: Name = Name::new(SmolStr::new_inline_from_ascii(11, b"macro_rules"));
113113
pub(crate) const STD: Name = Name::new(SmolStr::new_inline_from_ascii(3, b"std"));
114114
pub(crate) const ITER: Name = Name::new(SmolStr::new_inline_from_ascii(4, b"iter"));
115-
pub(crate) const INTO_ITERATOR: Name = Name::new(SmolStr::new_inline_from_ascii(12, b"IntoIterator"));
115+
pub(crate) const INTO_ITERATOR: Name =
116+
Name::new(SmolStr::new_inline_from_ascii(12, b"IntoIterator"));
116117
pub(crate) const ITEM: Name = Name::new(SmolStr::new_inline_from_ascii(4, b"Item"));
117118

118119
fn resolve_name(text: &SmolStr) -> SmolStr {

crates/ra_hir/src/nameres.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ use test_utils::tested_by;
6565

6666
use crate::{
6767
diagnostics::DiagnosticSink, either::Either, ids::MacroDefId,
68-
nameres::diagnostics::DefDiagnostic, AstDatabase, AstId, BuiltinType, Crate,
69-
DefDatabase, HirFileId, MacroDef, Module, ModuleDef, Name, Path, PathKind, Trait,
68+
nameres::diagnostics::DefDiagnostic, AstDatabase, AstId, BuiltinType, Crate, DefDatabase,
69+
HirFileId, MacroDef, Module, ModuleDef, Name, Path, PathKind, Trait,
7070
};
7171

7272
pub(crate) use self::raw::{ImportSourceMap, RawItems};

crates/ra_hir/src/nameres/collector.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ use crate::{
1313
diagnostics::DefDiagnostic, raw, CrateDefMap, CrateModuleId, ItemOrMacro, ModuleData,
1414
ModuleDef, PerNs, ReachedFixedPoint, Resolution, ResolveMode,
1515
},
16-
AstId, Const, DefDatabase, Enum, Function, HirFileId, MacroDef, Module, Name, Path,
17-
Static, Struct, Trait, TypeAlias, Union,
16+
AstId, Const, DefDatabase, Enum, Function, HirFileId, MacroDef, Module, Name, Path, Static,
17+
Struct, Trait, TypeAlias, Union,
1818
};
1919

2020
pub(super) fn collect_defs(db: &impl DefDatabase, mut def_map: CrateDefMap) -> CrateDefMap {

crates/ra_hir/src/ty/infer.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ use crate::{
4040
PatId, Statement, UnaryOp,
4141
},
4242
generics::{GenericParams, HasGenericParams},
43-
name::{SELF_TYPE, INTO_ITERATOR, ITEM, ITER, STD},
43+
name::{INTO_ITERATOR, ITEM, ITER, SELF_TYPE, STD},
4444
nameres::{Namespace, PerNs},
4545
path::{GenericArg, GenericArgs, PathKind, PathSegment},
4646
resolve::{
@@ -49,8 +49,8 @@ use crate::{
4949
},
5050
ty::infer::diagnostics::InferenceDiagnostic,
5151
type_ref::{Mutability, TypeRef},
52-
AdtDef, ConstData, DefWithBody, FnData, Function, HirDatabase, ImplItem,
53-
ModuleDef, Name, Path, StructField,
52+
AdtDef, ConstData, DefWithBody, FnData, Function, HirDatabase, ImplItem, ModuleDef, Name, Path,
53+
StructField,
5454
};
5555

5656
mod unify;

0 commit comments

Comments
 (0)