From 5cc14def55cc35cdf7304a434b403f66df5e6eb0 Mon Sep 17 00:00:00 2001 From: Ashar Date: Sun, 23 Nov 2025 13:40:17 +0530 Subject: [PATCH 1/2] chore(misc): ci activities and lint fixes --- Cargo.lock | 2 +- src/workspace/workspace_symbol.rs | 21 ++++++++++----------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5b95e2b..5878482 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -879,7 +879,7 @@ dependencies = [ [[package]] name = "protols" -version = "0.12.9" +version = "0.13.0" dependencies = [ "async-lsp", "basic-toml", diff --git a/src/workspace/workspace_symbol.rs b/src/workspace/workspace_symbol.rs index 5a57b15..45da1f6 100644 --- a/src/workspace/workspace_symbol.rs +++ b/src/workspace/workspace_symbol.rs @@ -1,7 +1,6 @@ #[cfg(test)] mod test { use insta::assert_yaml_snapshot; - use insta::internals::{Content, ContentPath}; use crate::config::Config; use crate::state::ProtoLanguageState; @@ -10,22 +9,22 @@ mod test { fn test_workspace_symbols() { let current_dir = std::env::current_dir().unwrap(); let ipath = vec![current_dir.join("src/workspace/input")]; - let a_uri = (&format!( + let a_uri = format!( "file://{}/src/workspace/input/a.proto", current_dir.to_str().unwrap() - )) + ) .parse() .unwrap(); - let b_uri = (&format!( + let b_uri = format!( "file://{}/src/workspace/input/b.proto", current_dir.to_str().unwrap() - )) + ) .parse() .unwrap(); - let c_uri = (&format!( + let c_uri = format!( "file://{}/src/workspace/input/c.proto", current_dir.to_str().unwrap() - )) + ) .parse() .unwrap(); @@ -49,7 +48,7 @@ mod test { ); format!( "file:///src/workspace/input/{}", - c.as_str().unwrap().split('/').last().unwrap() + c.as_str().unwrap().split('/').next_back().unwrap() ) })}); @@ -65,7 +64,7 @@ mod test { ); format!( "file:///src/workspace/input/{}", - c.as_str().unwrap().split('/').last().unwrap() + c.as_str().unwrap().split('/').next_back().unwrap() ) })}); @@ -75,11 +74,11 @@ mod test { assert!( c.as_str() .unwrap() - .contains(¤t_dir.to_str().unwrap()) + .contains(current_dir.to_str().unwrap()) ); format!( "file:///src/workspace/input/{}", - c.as_str().unwrap().split('/').last().unwrap() + c.as_str().unwrap().split('/').next_back().unwrap() ) })}); From ca8c0fe7959096bd77270fb0e2240594e1249e2e Mon Sep 17 00:00:00 2001 From: Ashar Date: Sun, 23 Nov 2025 13:42:36 +0530 Subject: [PATCH 2/2] add: lint check to ci --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index faac89c..01ff261 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,3 +20,5 @@ jobs: run: cargo build --verbose - name: Run tests run: cargo test --verbose + - name: Run lints + run: cargo clippy --all-targets -- -D warnings