aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide
diff options
context:
space:
mode:
authorKirill Bulatov <[email protected]>2020-02-02 12:27:52 +0000
committerKirill Bulatov <[email protected]>2020-02-02 12:27:52 +0000
commitc669b2f489cb551fbe53fd01f7532b5d55ffe704 (patch)
tree3fcd9d5dd6cc88ce98162cdea548b3dbd853ead6 /crates/ra_ide
parent6dae5cbb1190cde6a20aa1758c7d87e84933378e (diff)
Code review fixes
Diffstat (limited to 'crates/ra_ide')
-rw-r--r--crates/ra_ide/src/completion/complete_scope.rs26
1 files changed, 11 insertions, 15 deletions
diff --git a/crates/ra_ide/src/completion/complete_scope.rs b/crates/ra_ide/src/completion/complete_scope.rs
index fe0795984..64b04ec2b 100644
--- a/crates/ra_ide/src/completion/complete_scope.rs
+++ b/crates/ra_ide/src/completion/complete_scope.rs
@@ -72,62 +72,58 @@ pub(crate) struct ImportResolver {
72 72
73impl ImportResolver { 73impl ImportResolver {
74 pub(crate) fn new() -> Self { 74 pub(crate) fn new() -> Self {
75 use hir::name;
76
75 let dummy_names = vec![ 77 let dummy_names = vec![
76 ( 78 (
77 SmolStr::new("fmt"), 79 SmolStr::new("fmt"),
78 ModPath { kind: PathKind::Plain, segments: vec![hir::known::std, hir::known::fmt] }, 80 ModPath { kind: PathKind::Plain, segments: vec![name![std], name![fmt]] },
79 ), 81 ),
80 ( 82 (
81 SmolStr::new("io"), 83 SmolStr::new("io"),
82 ModPath { kind: PathKind::Plain, segments: vec![hir::known::std, hir::known::io] }, 84 ModPath { kind: PathKind::Plain, segments: vec![name![std], name![io]] },
83 ), 85 ),
84 ( 86 (
85 SmolStr::new("iter"), 87 SmolStr::new("iter"),
86 ModPath { 88 ModPath { kind: PathKind::Plain, segments: vec![name![std], name![iter]] },
87 kind: PathKind::Plain,
88 segments: vec![hir::known::std, hir::known::iter],
89 },
90 ), 89 ),
91 ( 90 (
92 SmolStr::new("hash"), 91 SmolStr::new("hash"),
93 ModPath { 92 ModPath { kind: PathKind::Plain, segments: vec![name![std], name![hash]] },
94 kind: PathKind::Plain,
95 segments: vec![hir::known::std, hir::known::hash],
96 },
97 ), 93 ),
98 ( 94 (
99 SmolStr::new("Debug"), 95 SmolStr::new("Debug"),
100 ModPath { 96 ModPath {
101 kind: PathKind::Plain, 97 kind: PathKind::Plain,
102 segments: vec![hir::known::std, hir::known::fmt, hir::known::Debug], 98 segments: vec![name![std], name![fmt], name![Debug]],
103 }, 99 },
104 ), 100 ),
105 ( 101 (
106 SmolStr::new("Display"), 102 SmolStr::new("Display"),
107 ModPath { 103 ModPath {
108 kind: PathKind::Plain, 104 kind: PathKind::Plain,
109 segments: vec![hir::known::std, hir::known::fmt, hir::known::Display], 105 segments: vec![name![std], name![fmt], name![Display]],
110 }, 106 },
111 ), 107 ),
112 ( 108 (
113 SmolStr::new("Hash"), 109 SmolStr::new("Hash"),
114 ModPath { 110 ModPath {
115 kind: PathKind::Plain, 111 kind: PathKind::Plain,
116 segments: vec![hir::known::std, hir::known::hash, hir::known::Hash], 112 segments: vec![name![std], name![hash], name![Hash]],
117 }, 113 },
118 ), 114 ),
119 ( 115 (
120 SmolStr::new("Hasher"), 116 SmolStr::new("Hasher"),
121 ModPath { 117 ModPath {
122 kind: PathKind::Plain, 118 kind: PathKind::Plain,
123 segments: vec![hir::known::std, hir::known::hash, hir::known::Hasher], 119 segments: vec![name![std], name![hash], name![Hasher]],
124 }, 120 },
125 ), 121 ),
126 ( 122 (
127 SmolStr::new("Iterator"), 123 SmolStr::new("Iterator"),
128 ModPath { 124 ModPath {
129 kind: PathKind::Plain, 125 kind: PathKind::Plain,
130 segments: vec![hir::known::std, hir::known::iter, hir::known::Iterator], 126 segments: vec![name![std], name![iter], name![Iterator]],
131 }, 127 },
132 ), 128 ),
133 ]; 129 ];