From 188c9967c0d0b6ab9acef5e879b5bbaf1a5035ed Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 20 Aug 2019 19:06:22 +0300 Subject: Drop unnecessary `&'_` from impls --- crates/ra_lsp_server/src/conv.rs | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'crates/ra_lsp_server') diff --git a/crates/ra_lsp_server/src/conv.rs b/crates/ra_lsp_server/src/conv.rs index 1a70ec3a2..818fa6d61 100644 --- a/crates/ra_lsp_server/src/conv.rs +++ b/crates/ra_lsp_server/src/conv.rs @@ -88,7 +88,7 @@ impl Conv for Severity { } } -impl ConvWith<(&'_ LineIndex, LineEndings)> for CompletionItem { +impl ConvWith<(&LineIndex, LineEndings)> for CompletionItem { type Output = ::lsp_types::CompletionItem; fn conv_with(self, ctx: (&LineIndex, LineEndings)) -> ::lsp_types::CompletionItem { @@ -136,7 +136,7 @@ impl ConvWith<(&'_ LineIndex, LineEndings)> for CompletionItem { } } -impl ConvWith<&'_ LineIndex> for Position { +impl ConvWith<&LineIndex> for Position { type Output = TextUnit; fn conv_with(self, line_index: &LineIndex) -> TextUnit { @@ -145,7 +145,7 @@ impl ConvWith<&'_ LineIndex> for Position { } } -impl ConvWith<&'_ LineIndex> for TextUnit { +impl ConvWith<&LineIndex> for TextUnit { type Output = Position; fn conv_with(self, line_index: &LineIndex) -> Position { @@ -154,7 +154,7 @@ impl ConvWith<&'_ LineIndex> for TextUnit { } } -impl ConvWith<&'_ LineIndex> for TextRange { +impl ConvWith<&LineIndex> for TextRange { type Output = Range; fn conv_with(self, line_index: &LineIndex) -> Range { @@ -162,7 +162,7 @@ impl ConvWith<&'_ LineIndex> for TextRange { } } -impl ConvWith<&'_ LineIndex> for Range { +impl ConvWith<&LineIndex> for Range { type Output = TextRange; fn conv_with(self, line_index: &LineIndex) -> TextRange { @@ -202,7 +202,7 @@ impl Conv for ra_ide_api::FunctionSignature { } } -impl ConvWith<(&'_ LineIndex, LineEndings)> for TextEdit { +impl ConvWith<(&LineIndex, LineEndings)> for TextEdit { type Output = Vec; fn conv_with(self, ctx: (&LineIndex, LineEndings)) -> Vec { @@ -210,7 +210,7 @@ impl ConvWith<(&'_ LineIndex, LineEndings)> for TextEdit { } } -impl ConvWith<(&'_ LineIndex, LineEndings)> for &'_ AtomTextEdit { +impl ConvWith<(&LineIndex, LineEndings)> for &AtomTextEdit { type Output = lsp_types::TextEdit; fn conv_with( @@ -234,42 +234,42 @@ impl, CTX> ConvWith for Option { } } -impl TryConvWith<&'_ WorldSnapshot> for &'_ Url { +impl TryConvWith<&WorldSnapshot> for &Url { type Output = FileId; fn try_conv_with(self, world: &WorldSnapshot) -> Result { world.uri_to_file_id(self) } } -impl TryConvWith<&'_ WorldSnapshot> for FileId { +impl TryConvWith<&WorldSnapshot> for FileId { type Output = Url; fn try_conv_with(self, world: &WorldSnapshot) -> Result { world.file_id_to_uri(self) } } -impl TryConvWith<&'_ WorldSnapshot> for &'_ TextDocumentItem { +impl TryConvWith<&WorldSnapshot> for &TextDocumentItem { type Output = FileId; fn try_conv_with(self, world: &WorldSnapshot) -> Result { self.uri.try_conv_with(world) } } -impl TryConvWith<&'_ WorldSnapshot> for &'_ VersionedTextDocumentIdentifier { +impl TryConvWith<&WorldSnapshot> for &VersionedTextDocumentIdentifier { type Output = FileId; fn try_conv_with(self, world: &WorldSnapshot) -> Result { self.uri.try_conv_with(world) } } -impl TryConvWith<&'_ WorldSnapshot> for &'_ TextDocumentIdentifier { +impl TryConvWith<&WorldSnapshot> for &TextDocumentIdentifier { type Output = FileId; fn try_conv_with(self, world: &WorldSnapshot) -> Result { world.uri_to_file_id(&self.uri) } } -impl TryConvWith<&'_ WorldSnapshot> for &'_ TextDocumentPositionParams { +impl TryConvWith<&WorldSnapshot> for &TextDocumentPositionParams { type Output = FilePosition; fn try_conv_with(self, world: &WorldSnapshot) -> Result { let file_id = self.text_document.try_conv_with(world)?; @@ -279,7 +279,7 @@ impl TryConvWith<&'_ WorldSnapshot> for &'_ TextDocumentPositionParams { } } -impl TryConvWith<&'_ WorldSnapshot> for (&'_ TextDocumentIdentifier, Range) { +impl TryConvWith<&WorldSnapshot> for (&TextDocumentIdentifier, Range) { type Output = FileRange; fn try_conv_with(self, world: &WorldSnapshot) -> Result { let file_id = self.0.try_conv_with(world)?; @@ -300,7 +300,7 @@ impl, CTX: Copy> TryConvWith for Vec { } } -impl TryConvWith<&'_ WorldSnapshot> for SourceChange { +impl TryConvWith<&WorldSnapshot> for SourceChange { type Output = req::SourceChange; fn try_conv_with(self, world: &WorldSnapshot) -> Result { let cursor_position = match self.cursor_position { @@ -339,7 +339,7 @@ impl TryConvWith<&'_ WorldSnapshot> for SourceChange { } } -impl TryConvWith<&'_ WorldSnapshot> for SourceFileEdit { +impl TryConvWith<&WorldSnapshot> for SourceFileEdit { type Output = TextDocumentEdit; fn try_conv_with(self, world: &WorldSnapshot) -> Result { let text_document = VersionedTextDocumentIdentifier { @@ -354,7 +354,7 @@ impl TryConvWith<&'_ WorldSnapshot> for SourceFileEdit { } } -impl TryConvWith<&'_ WorldSnapshot> for FileSystemEdit { +impl TryConvWith<&WorldSnapshot> for FileSystemEdit { type Output = ResourceOp; fn try_conv_with(self, world: &WorldSnapshot) -> Result { let res = match self { @@ -372,7 +372,7 @@ impl TryConvWith<&'_ WorldSnapshot> for FileSystemEdit { } } -impl TryConvWith<&'_ WorldSnapshot> for &NavigationTarget { +impl TryConvWith<&WorldSnapshot> for &NavigationTarget { type Output = Location; fn try_conv_with(self, world: &WorldSnapshot) -> Result { let line_index = world.analysis().file_line_index(self.file_id())?; @@ -381,7 +381,7 @@ impl TryConvWith<&'_ WorldSnapshot> for &NavigationTarget { } } -impl TryConvWith<&'_ WorldSnapshot> for (FileId, RangeInfo) { +impl TryConvWith<&WorldSnapshot> for (FileId, RangeInfo) { type Output = LocationLink; fn try_conv_with(self, world: &WorldSnapshot) -> Result { let (src_file_id, target) = self; @@ -408,7 +408,7 @@ impl TryConvWith<&'_ WorldSnapshot> for (FileId, RangeInfo) { } } -impl TryConvWith<&'_ WorldSnapshot> for (FileId, RangeInfo>) { +impl TryConvWith<&WorldSnapshot> for (FileId, RangeInfo>) { type Output = req::GotoDefinitionResponse; fn try_conv_with(self, world: &WorldSnapshot) -> Result { let (file_id, RangeInfo { range, info: navs }) = self; -- cgit v1.2.3