@@ -171,7 +171,7 @@ pub struct State {
171171
172172impl State {
173173 #[ allow( clippy:: new_ret_no_self) ]
174- pub fn new ( tx : crossbeam_channel:: Sender < Call > ) -> Fallible < State > {
174+ pub fn new ( tx : crossbeam_channel:: Sender < Call > ) -> Fallible < Self > {
175175 let logger = logger:: init ( ) ?;
176176
177177 let client = RpcClient :: new (
@@ -182,7 +182,7 @@ impl State {
182182 tx. clone ( ) ,
183183 ) ?;
184184
185- Ok ( State {
185+ Ok ( Self {
186186 tx,
187187
188188 clients : hashmap ! {
@@ -333,11 +333,11 @@ pub struct DiagnosticsDisplay {
333333}
334334
335335impl DiagnosticsDisplay {
336- pub fn default ( ) -> HashMap < u64 , DiagnosticsDisplay > {
336+ pub fn default ( ) -> HashMap < u64 , Self > {
337337 let mut map = HashMap :: new ( ) ;
338338 map. insert (
339339 1 ,
340- DiagnosticsDisplay {
340+ Self {
341341 name : "Error" . to_owned ( ) ,
342342 texthl : "ALEError" . to_owned ( ) ,
343343 signText : "✖" . to_owned ( ) ,
@@ -347,7 +347,7 @@ impl DiagnosticsDisplay {
347347 ) ;
348348 map. insert (
349349 2 ,
350- DiagnosticsDisplay {
350+ Self {
351351 name : "Warning" . to_owned ( ) ,
352352 texthl : "ALEWarning" . to_owned ( ) ,
353353 signText : "⚠" . to_owned ( ) ,
@@ -357,7 +357,7 @@ impl DiagnosticsDisplay {
357357 ) ;
358358 map. insert (
359359 3 ,
360- DiagnosticsDisplay {
360+ Self {
361361 name : "Information" . to_owned ( ) ,
362362 texthl : "ALEInfo" . to_owned ( ) ,
363363 signText : "ℹ" . to_owned ( ) ,
@@ -367,7 +367,7 @@ impl DiagnosticsDisplay {
367367 ) ;
368368 map. insert (
369369 4 ,
370- DiagnosticsDisplay {
370+ Self {
371371 name : "Hint" . to_owned ( ) ,
372372 texthl : "ALEInfo" . to_owned ( ) ,
373373 signText : "➤" . to_owned ( ) ,
@@ -386,25 +386,25 @@ pub struct DocumentHighlightDisplay {
386386}
387387
388388impl DocumentHighlightDisplay {
389- pub fn default ( ) -> HashMap < u64 , DocumentHighlightDisplay > {
389+ pub fn default ( ) -> HashMap < u64 , Self > {
390390 let mut map = HashMap :: new ( ) ;
391391 map. insert (
392392 1 ,
393- DocumentHighlightDisplay {
393+ Self {
394394 name : "Text" . to_owned ( ) ,
395395 texthl : "SpellCap" . to_owned ( ) ,
396396 } ,
397397 ) ;
398398 map. insert (
399399 2 ,
400- DocumentHighlightDisplay {
400+ Self {
401401 name : "Read" . to_owned ( ) ,
402402 texthl : "SpellLocal" . to_owned ( ) ,
403403 } ,
404404 ) ;
405405 map. insert (
406406 3 ,
407- DocumentHighlightDisplay {
407+ Self {
408408 name : "Write" . to_owned ( ) ,
409409 texthl : "SpellRare" . to_owned ( ) ,
410410 } ,
@@ -526,10 +526,7 @@ pub struct VimCompleteItemUserData {
526526}
527527
528528impl VimCompleteItem {
529- pub fn from_lsp (
530- lspitem : & CompletionItem ,
531- complete_position : Option < u64 > ,
532- ) -> Fallible < VimCompleteItem > {
529+ pub fn from_lsp ( lspitem : & CompletionItem , complete_position : Option < u64 > ) -> Fallible < Self > {
533530 let abbr = lspitem. label . clone ( ) ;
534531 let mut word = lspitem. insert_text . clone ( ) . unwrap_or_default ( ) ;
535532 if word. is_empty ( ) {
@@ -573,7 +570,7 @@ impl VimCompleteItem {
573570 snippet : snippet. clone ( ) ,
574571 } ;
575572
576- Ok ( VimCompleteItem {
573+ Ok ( Self {
577574 word,
578575 abbr,
579576 icase : Some ( 1 ) ,
@@ -1027,7 +1024,7 @@ impl FromLSP<SymbolInformation> for QuickfixEntry {
10271024 fn from_lsp ( sym : & SymbolInformation ) -> Fallible < Self > {
10281025 let start = sym. location . range . start ;
10291026
1030- Ok ( QuickfixEntry {
1027+ Ok ( Self {
10311028 filename : sym. location . uri . filepath ( ) ?. to_string_lossy ( ) . into_owned ( ) ,
10321029 lnum : start. line + 1 ,
10331030 col : Some ( start. character + 1 ) ,
0 commit comments