Skip to content
This repository has been archived by the owner on Oct 19, 2023. It is now read-only.

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
olegklimov committed Oct 6, 2023
1 parent 6d00eb0 commit 082afb5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ async fn main() {
.compact()
.init();
info!("started");
info!("cache dir: {}", cache_dir.display());

let gcx2 = gcx.clone();
let gcx3 = gcx.clone();
Expand Down Expand Up @@ -70,7 +71,7 @@ async fn main() {
// tower-lsp-0.20.0/examples/tcp.rs
match listener.accept().await {
Ok((s, addr)) => {
info!("new client connection from {}", addr);
info!("LSP new client connection from {}", addr);
let (read, write) = tokio::io::split(s);
let (lsp_service, socket) = lsp::build_lsp_service(gcx2.clone());
tower_lsp::Server::new(read, write, socket).serve(lsp_service).await;
Expand Down
8 changes: 6 additions & 2 deletions src/telemetry_snippets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ pub struct SnippetTelemetry {
pub grey_text: String,
pub accepted: bool,
pub corrected_by_user: String,
pub remaining_percent: f64,
// add
pub remaining_percent_30s: f64,
// pub remaining_percent_300s: f64,
// pub remaining_percent_walkaway: f64,
// pub walkaway_ms: u64,
}

pub fn snippet_register(
Expand All @@ -66,7 +70,7 @@ pub fn snippet_register(
grey_text: grey_text.clone(),
accepted: false,
corrected_by_user: "".to_string(),
remaining_percent: 0.0,
remaining_percent_30s: 0.0,
};
storage_locked.tele_snippet_next_id += 1;
storage_locked.tele_snippets.push(snip);
Expand Down

0 comments on commit 082afb5

Please sign in to comment.