From ccca427ce45d18d80b1876a7c5b05cf3205b86e5 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 20 Aug 2019 18:25:27 +0300 Subject: minor --- crates/ra_lsp_server/src/conv.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_lsp_server/src/conv.rs') diff --git a/crates/ra_lsp_server/src/conv.rs b/crates/ra_lsp_server/src/conv.rs index df8ea6e0d..236fdb972 100644 --- a/crates/ra_lsp_server/src/conv.rs +++ b/crates/ra_lsp_server/src/conv.rs @@ -217,7 +217,7 @@ impl ConvWith for TextEdit { } } -impl<'a> ConvWith for &'a AtomTextEdit { +impl ConvWith for &'_ AtomTextEdit { type Ctx = LineIndex; type Output = lsp_types::TextEdit; -- cgit v1.2.3 From 80a6e614465d8b16cae50f3626c15e912ad3c6f2 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 20 Aug 2019 18:33:23 +0300 Subject: make CTX type param instead of assoc type that way, we can implement ConvWith<&'_ CTX> for different lifetimes --- crates/ra_lsp_server/src/conv.rs | 59 +++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 34 deletions(-) (limited to 'crates/ra_lsp_server/src/conv.rs') diff --git a/crates/ra_lsp_server/src/conv.rs b/crates/ra_lsp_server/src/conv.rs index 236fdb972..bbe140b7a 100644 --- a/crates/ra_lsp_server/src/conv.rs +++ b/crates/ra_lsp_server/src/conv.rs @@ -19,10 +19,9 @@ pub trait Conv { fn conv(self) -> Self::Output; } -pub trait ConvWith { - type Ctx; +pub trait ConvWith { type Output; - fn conv_with(self, ctx: &Self::Ctx) -> Self::Output; + fn conv_with(self, ctx: CTX) -> Self::Output; } pub trait TryConvWith { @@ -89,8 +88,7 @@ impl Conv for Severity { } } -impl ConvWith for CompletionItem { - type Ctx = LineIndex; +impl ConvWith<&'_ LineIndex> for CompletionItem { type Output = ::lsp_types::CompletionItem; fn conv_with(self, ctx: &LineIndex) -> ::lsp_types::CompletionItem { @@ -138,8 +136,7 @@ impl ConvWith for CompletionItem { } } -impl ConvWith for Position { - type Ctx = LineIndex; +impl ConvWith<&'_ LineIndex> for Position { type Output = TextUnit; fn conv_with(self, line_index: &LineIndex) -> TextUnit { @@ -148,8 +145,7 @@ impl ConvWith for Position { } } -impl ConvWith for TextUnit { - type Ctx = LineIndex; +impl ConvWith<&'_ LineIndex> for TextUnit { type Output = Position; fn conv_with(self, line_index: &LineIndex) -> Position { @@ -158,8 +154,7 @@ impl ConvWith for TextUnit { } } -impl ConvWith for TextRange { - type Ctx = LineIndex; +impl ConvWith<&'_ LineIndex> for TextRange { type Output = Range; fn conv_with(self, line_index: &LineIndex) -> Range { @@ -167,8 +162,7 @@ impl ConvWith for TextRange { } } -impl ConvWith for Range { - type Ctx = LineIndex; +impl ConvWith<&'_ LineIndex> for Range { type Output = TextRange; fn conv_with(self, line_index: &LineIndex) -> TextRange { @@ -208,8 +202,7 @@ impl Conv for ra_ide_api::FunctionSignature { } } -impl ConvWith for TextEdit { - type Ctx = LineIndex; +impl ConvWith<&'_ LineIndex> for TextEdit { type Output = Vec; fn conv_with(self, line_index: &LineIndex) -> Vec { @@ -217,8 +210,7 @@ impl ConvWith for TextEdit { } } -impl ConvWith for &'_ AtomTextEdit { - type Ctx = LineIndex; +impl ConvWith<&'_ LineIndex> for &'_ AtomTextEdit { type Output = lsp_types::TextEdit; fn conv_with(self, line_index: &LineIndex) -> lsp_types::TextEdit { @@ -229,10 +221,10 @@ impl ConvWith for &'_ AtomTextEdit { } } -impl ConvWith for Option { - type Ctx = ::Ctx; - type Output = Option<::Output>; - fn conv_with(self, ctx: &Self::Ctx) -> Self::Output { +impl, CTX> ConvWith for Option { + type Output = Option; + + fn conv_with(self, ctx: CTX) -> Self::Output { self.map(|x| ConvWith::conv_with(x, ctx)) } } @@ -454,35 +446,34 @@ pub fn to_location( Ok(loc) } -pub trait MapConvWith<'a>: Sized + 'a { - type Ctx; +pub trait MapConvWith: Sized { type Output; - fn map_conv_with(self, ctx: &'a Self::Ctx) -> ConvWithIter<'a, Self, Self::Ctx> { + fn map_conv_with(self, ctx: CTX) -> ConvWithIter { ConvWithIter { iter: self, ctx } } } -impl<'a, I> MapConvWith<'a> for I +impl MapConvWith for I where - I: Iterator + 'a, - I::Item: ConvWith, + I: Iterator, + I::Item: ConvWith, { - type Ctx = ::Ctx; - type Output = ::Output; + type Output = >::Output; } -pub struct ConvWithIter<'a, I, Ctx: 'a> { +pub struct ConvWithIter { iter: I, - ctx: &'a Ctx, + ctx: CTX, } -impl<'a, I, Ctx> Iterator for ConvWithIter<'a, I, Ctx> +impl Iterator for ConvWithIter where I: Iterator, - I::Item: ConvWith, + I::Item: ConvWith, + CTX: Copy, { - type Item = ::Output; + type Item = >::Output; fn next(&mut self) -> Option { self.iter.next().map(|item| item.conv_with(self.ctx)) -- cgit v1.2.3 From 6ea4184fd107e5cc155b95a3cf058200c38d544d Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 20 Aug 2019 18:53:59 +0300 Subject: translate \n -> \r\n on the way out --- crates/ra_lsp_server/src/conv.rs | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) (limited to 'crates/ra_lsp_server/src/conv.rs') diff --git a/crates/ra_lsp_server/src/conv.rs b/crates/ra_lsp_server/src/conv.rs index bbe140b7a..bd1ffd8f5 100644 --- a/crates/ra_lsp_server/src/conv.rs +++ b/crates/ra_lsp_server/src/conv.rs @@ -11,6 +11,7 @@ use ra_ide_api::{ }; use ra_syntax::{SyntaxKind, TextRange, TextUnit}; use ra_text_edit::{AtomTextEdit, TextEdit}; +use ra_vfs::LineEndings; use crate::{req, world::WorldSnapshot, Result}; @@ -88,10 +89,10 @@ impl Conv for Severity { } } -impl ConvWith<&'_ LineIndex> for CompletionItem { +impl ConvWith<(&'_ LineIndex, LineEndings)> for CompletionItem { type Output = ::lsp_types::CompletionItem; - fn conv_with(self, ctx: &LineIndex) -> ::lsp_types::CompletionItem { + fn conv_with(self, ctx: (&LineIndex, LineEndings)) -> ::lsp_types::CompletionItem { let mut additional_text_edits = Vec::new(); let mut text_edit = None; // LSP does not allow arbitrary edits in completion, so we have to do a @@ -202,22 +203,27 @@ impl Conv for ra_ide_api::FunctionSignature { } } -impl ConvWith<&'_ LineIndex> for TextEdit { +impl ConvWith<(&'_ LineIndex, LineEndings)> for TextEdit { type Output = Vec; - fn conv_with(self, line_index: &LineIndex) -> Vec { - self.as_atoms().iter().map_conv_with(line_index).collect() + fn conv_with(self, ctx: (&LineIndex, LineEndings)) -> Vec { + self.as_atoms().iter().map_conv_with(ctx).collect() } } -impl ConvWith<&'_ LineIndex> for &'_ AtomTextEdit { +impl ConvWith<(&'_ LineIndex, LineEndings)> for &'_ AtomTextEdit { type Output = lsp_types::TextEdit; - fn conv_with(self, line_index: &LineIndex) -> lsp_types::TextEdit { - lsp_types::TextEdit { - range: self.delete.conv_with(line_index), - new_text: self.insert.clone(), + fn conv_with( + self, + (line_index, line_endings): (&LineIndex, LineEndings), + ) -> lsp_types::TextEdit { + eprintln!("line_endings = {:?}", line_endings); + let mut new_text = self.insert.clone(); + if line_endings == LineEndings::Dos { + new_text = new_text.replace('\n', "\r\n"); } + lsp_types::TextEdit { range: self.delete.conv_with(line_index), new_text } } } @@ -352,7 +358,9 @@ impl TryConvWith for SourceFileEdit { version: None, }; let line_index = world.analysis().file_line_index(self.file_id)?; - let edits = self.edit.as_atoms().iter().map_conv_with(&line_index).collect(); + let line_endings = world.file_line_endings(self.file_id); + let edits = + self.edit.as_atoms().iter().map_conv_with((&line_index, line_endings)).collect(); Ok(TextDocumentEdit { text_document, edits }) } } -- cgit v1.2.3 From 4753409f86bf21b8d0ba7bd83918aa951921c97c Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 20 Aug 2019 19:05:44 +0300 Subject: refactor TryConvWith similar to ConvWith --- crates/ra_lsp_server/src/conv.rs | 68 +++++++++++++++------------------------- 1 file changed, 26 insertions(+), 42 deletions(-) (limited to 'crates/ra_lsp_server/src/conv.rs') diff --git a/crates/ra_lsp_server/src/conv.rs b/crates/ra_lsp_server/src/conv.rs index bd1ffd8f5..1a70ec3a2 100644 --- a/crates/ra_lsp_server/src/conv.rs +++ b/crates/ra_lsp_server/src/conv.rs @@ -25,10 +25,9 @@ pub trait ConvWith { fn conv_with(self, ctx: CTX) -> Self::Output; } -pub trait TryConvWith { - type Ctx; +pub trait TryConvWith { type Output; - fn try_conv_with(self, ctx: &Self::Ctx) -> Result; + fn try_conv_with(self, ctx: CTX) -> Result; } impl Conv for SyntaxKind { @@ -235,48 +234,42 @@ impl, CTX> ConvWith for Option { } } -impl<'a> TryConvWith for &'a Url { - type Ctx = WorldSnapshot; +impl TryConvWith<&'_ WorldSnapshot> for &'_ Url { type Output = FileId; fn try_conv_with(self, world: &WorldSnapshot) -> Result { world.uri_to_file_id(self) } } -impl TryConvWith for FileId { - type Ctx = WorldSnapshot; +impl TryConvWith<&'_ WorldSnapshot> for FileId { type Output = Url; fn try_conv_with(self, world: &WorldSnapshot) -> Result { world.file_id_to_uri(self) } } -impl<'a> TryConvWith for &'a TextDocumentItem { - type Ctx = WorldSnapshot; +impl TryConvWith<&'_ WorldSnapshot> for &'_ TextDocumentItem { type Output = FileId; fn try_conv_with(self, world: &WorldSnapshot) -> Result { self.uri.try_conv_with(world) } } -impl<'a> TryConvWith for &'a VersionedTextDocumentIdentifier { - type Ctx = WorldSnapshot; +impl TryConvWith<&'_ WorldSnapshot> for &'_ VersionedTextDocumentIdentifier { type Output = FileId; fn try_conv_with(self, world: &WorldSnapshot) -> Result { self.uri.try_conv_with(world) } } -impl<'a> TryConvWith for &'a TextDocumentIdentifier { - type Ctx = WorldSnapshot; +impl TryConvWith<&'_ WorldSnapshot> for &'_ TextDocumentIdentifier { type Output = FileId; fn try_conv_with(self, world: &WorldSnapshot) -> Result { world.uri_to_file_id(&self.uri) } } -impl<'a> TryConvWith for &'a TextDocumentPositionParams { - type Ctx = WorldSnapshot; +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)?; @@ -286,8 +279,7 @@ impl<'a> TryConvWith for &'a TextDocumentPositionParams { } } -impl<'a> TryConvWith for (&'a TextDocumentIdentifier, Range) { - type Ctx = WorldSnapshot; +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)?; @@ -297,10 +289,9 @@ impl<'a> TryConvWith for (&'a TextDocumentIdentifier, Range) { } } -impl TryConvWith for Vec { - type Ctx = ::Ctx; - type Output = Vec<::Output>; - fn try_conv_with(self, ctx: &Self::Ctx) -> Result { +impl, CTX: Copy> TryConvWith for Vec { + type Output = Vec<>::Output>; + fn try_conv_with(self, ctx: CTX) -> Result { let mut res = Vec::with_capacity(self.len()); for item in self { res.push(item.try_conv_with(ctx)?); @@ -309,8 +300,7 @@ impl TryConvWith for Vec { } } -impl TryConvWith for SourceChange { - type Ctx = WorldSnapshot; +impl TryConvWith<&'_ WorldSnapshot> for SourceChange { type Output = req::SourceChange; fn try_conv_with(self, world: &WorldSnapshot) -> Result { let cursor_position = match self.cursor_position { @@ -349,8 +339,7 @@ impl TryConvWith for SourceChange { } } -impl TryConvWith for SourceFileEdit { - type Ctx = WorldSnapshot; +impl TryConvWith<&'_ WorldSnapshot> for SourceFileEdit { type Output = TextDocumentEdit; fn try_conv_with(self, world: &WorldSnapshot) -> Result { let text_document = VersionedTextDocumentIdentifier { @@ -365,8 +354,7 @@ impl TryConvWith for SourceFileEdit { } } -impl TryConvWith for FileSystemEdit { - type Ctx = WorldSnapshot; +impl TryConvWith<&'_ WorldSnapshot> for FileSystemEdit { type Output = ResourceOp; fn try_conv_with(self, world: &WorldSnapshot) -> Result { let res = match self { @@ -384,8 +372,7 @@ impl TryConvWith for FileSystemEdit { } } -impl TryConvWith for &NavigationTarget { - type Ctx = WorldSnapshot; +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())?; @@ -394,8 +381,7 @@ impl TryConvWith for &NavigationTarget { } } -impl TryConvWith for (FileId, RangeInfo) { - type Ctx = WorldSnapshot; +impl TryConvWith<&'_ WorldSnapshot> for (FileId, RangeInfo) { type Output = LocationLink; fn try_conv_with(self, world: &WorldSnapshot) -> Result { let (src_file_id, target) = self; @@ -422,8 +408,7 @@ impl TryConvWith for (FileId, RangeInfo) { } } -impl TryConvWith for (FileId, RangeInfo>) { - type Ctx = WorldSnapshot; +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; @@ -488,22 +473,21 @@ where } } -pub trait TryConvWithToVec<'a>: Sized + 'a { - type Ctx; +pub trait TryConvWithToVec: Sized { type Output; - fn try_conv_with_to_vec(self, ctx: &'a Self::Ctx) -> Result>; + fn try_conv_with_to_vec(self, ctx: CTX) -> Result>; } -impl<'a, I> TryConvWithToVec<'a> for I +impl TryConvWithToVec for I where - I: Iterator + 'a, - I::Item: TryConvWith, + I: Iterator, + I::Item: TryConvWith, + CTX: Copy, { - type Ctx = ::Ctx; - type Output = ::Output; + type Output = >::Output; - fn try_conv_with_to_vec(self, ctx: &'a Self::Ctx) -> Result> { + fn try_conv_with_to_vec(self, ctx: CTX) -> Result> { self.map(|it| it.try_conv_with(ctx)).collect() } } -- cgit v1.2.3 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/src/conv.rs') 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 From 77751cfe01311d9e4fbb61c8dca352289499b3b7 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 20 Aug 2019 19:55:34 +0300 Subject: remove debug-print --- crates/ra_lsp_server/src/conv.rs | 1 - 1 file changed, 1 deletion(-) (limited to 'crates/ra_lsp_server/src/conv.rs') diff --git a/crates/ra_lsp_server/src/conv.rs b/crates/ra_lsp_server/src/conv.rs index 818fa6d61..0ad2ea10f 100644 --- a/crates/ra_lsp_server/src/conv.rs +++ b/crates/ra_lsp_server/src/conv.rs @@ -217,7 +217,6 @@ impl ConvWith<(&LineIndex, LineEndings)> for &AtomTextEdit { self, (line_index, line_endings): (&LineIndex, LineEndings), ) -> lsp_types::TextEdit { - eprintln!("line_endings = {:?}", line_endings); let mut new_text = self.insert.clone(); if line_endings == LineEndings::Dos { new_text = new_text.replace('\n', "\r\n"); -- cgit v1.2.3