Skip to content

Commit

Permalink
fmt code
Browse files Browse the repository at this point in the history
Signed-off-by: he1pa <[email protected]>
  • Loading branch information
He1pa committed May 28, 2024
1 parent 8e2fd01 commit 9250b87
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion kclvm/tools/src/LSP/src/find_refs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ pub(crate) fn find_refs_from_def<F: Fn(String) -> Result<(), anyhow::Error>>(
vfs: vfs.clone(),
entry_cache: entry_cache.clone(),
tool: Arc::new(RwLock::new(toolchain::default())),
}).1 {
})
.1
{
Ok((_, gs)) => {
let ref_pos = kcl_pos(&file_path, ref_loc.range.start);
if *ref_loc == def_loc && !include_declaration {
Expand Down
3 changes: 2 additions & 1 deletion kclvm/tools/src/LSP/src/quick_fix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ mod tests {
vfs: Some(KCLVfs::default()),
entry_cache: None,
tool: Arc::new(RwLock::new(toolchain::default())),
}).0;
})
.0;

let diagnostics = diags
.iter()
Expand Down
3 changes: 1 addition & 2 deletions kclvm/tools/src/LSP/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ use parking_lot::RwLockReadGuard;
use ra_ap_vfs::{FileId, Vfs};
use serde::{de::DeserializeOwned, Serialize};

use std::path::Path;
use std::fs;
use std::path::Path;

#[allow(unused)]
/// Deserializes a `T` from a json value.
Expand Down Expand Up @@ -145,7 +145,6 @@ pub(crate) fn compile_with_params(
Ok(gs) => (diags, Ok((program, gs))),
Err(e) => (diags, Err(anyhow::anyhow!("Parse failed: {:?}", e))),
}

}

/// Update text with TextDocumentContentChangeEvent param
Expand Down

0 comments on commit 9250b87

Please sign in to comment.