Skip to content

Commit

Permalink
misc: applied suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
baszalmstra committed Feb 26, 2021
1 parent 13d722f commit 12d006f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion crates/mun_hir/src/line_index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ impl LineIndex {
col.into()
}

/// Given a line and column number for utf8 text convert it to the offset in utf16 text.
/// Given a line and column number for utf8 text, convert it to the offset in utf16 text.
fn utf8_to_utf16_col(&self, line: u32, col: TextSize) -> usize {
let mut res: usize = col.into();
if let Some(utf16_chars) = self.utf16_lines.get(&line) {
Expand Down
3 changes: 0 additions & 3 deletions crates/mun_language_server/src/completion/context.rs

This file was deleted.

4 changes: 2 additions & 2 deletions crates/mun_language_server/src/from_lsp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub(crate) fn abs_path(uri: &Url) -> anyhow::Result<AbsPathBuf> {
.ok_or_else(|| anyhow::anyhow!("invalid uri: {}", uri))
}

/// Returns the `hir::FileId` associated with the given `Url`
/// Returns the `hir::FileId` associated with the given `Url`.
pub(crate) fn file_id(
snapshot: &LanguageServerSnapshot,
url: &lsp_types::Url,
Expand All @@ -32,7 +32,7 @@ pub(crate) fn file_id(
})
}

/// Converts the specified `offset` to our own `TextSize` structure
/// Converts the specified offset to our own `TextSize` structure
pub(crate) fn offset(line_index: &LineIndex, position: lsp_types::Position) -> TextSize {
let line_col = hir::line_index::LineCol {
line: position.line as u32,
Expand Down

0 comments on commit 12d006f

Please sign in to comment.