on master help sign in
Lint
commit6c705f09e88a4b63c4ed854bc9e956b0539ca8af authorBlaž Hrastnik <blaz@mxxn.io> dateSun 9 May 2021, 17:13 (5 years ago) parentdbe870e
2 files changed+5−5
helix-core/src/selection.rs+2−2 helix-lsp/src/lib.rs+3−3
helix-core/src/selection.rs+2−2
@@ -210,7 +210,7 @@ impl Selection {
210210 Self::single(pos, pos)
211211 }
212212
213− fn normalize(mut ranges: SmallVec<[Range; 1]>, mut primary_index: usize) -> Selection {
213+ fn normalize(mut ranges: SmallVec<[Range; 1]>, mut primary_index: usize) -> Self {
214214 let primary = ranges[primary_index];
215215 ranges.sort_unstable_by_key(Range::from);
216216 primary_index = ranges.iter().position(|&range| range == primary).unwrap();
@@ -249,7 +249,7 @@ impl Selection {
249249 result.push(range)
250250 }
251251
252− Selection {
252+ Self {
253253 ranges: result,
254254 primary_index,
255255 }
helix-lsp/src/lib.rs+3−3
@@ -140,20 +140,20 @@ impl Notification {
140140 .expect("Failed to parse PublishDiagnostics params");
141141
142142 // TODO: need to loop over diagnostics and distinguish them by URI
143− Notification::PublishDiagnostics(params)
143+ Self::PublishDiagnostics(params)
144144 }
145145
146146 lsp::notification::ShowMessage::METHOD => {
147147 let params: lsp::ShowMessageParams =
148148 params.parse().expect("Failed to parse ShowMessage params");
149149
150− Notification::ShowMessage(params)
150+ Self::ShowMessage(params)
151151 }
152152 lsp::notification::LogMessage::METHOD => {
153153 let params: lsp::LogMessageParams =
154154 params.parse().expect("Failed to parse ShowMessage params");
155155
156− Notification::LogMessage(params)
156+ Self::LogMessage(params)
157157 }
158158 _ => {
159159 log::error!("unhandled LSP notification: {}", method);