Skip to content

Commit 40240ea

Browse files
committed
Fix lint
1 parent 40c485e commit 40240ea

6 files changed

Lines changed: 22 additions & 20 deletions

File tree

crates/codegraph-extract/src/languages/common.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,10 @@ fn annotation_args(node: &Node, src: &[u8]) -> HashMap<String, String> {
431431
let mut args = HashMap::new();
432432
for ch in named_children(node) {
433433
// Java: `annotation_argument_list`; C#/PHP: `attribute_argument_list`.
434-
if !matches!(ch.kind(), "annotation_argument_list" | "attribute_argument_list") {
434+
if !matches!(
435+
ch.kind(),
436+
"annotation_argument_list" | "attribute_argument_list"
437+
) {
435438
continue;
436439
}
437440
for (i, arg) in named_children(&ch).into_iter().enumerate() {

crates/codegraph-extract/src/languages/csharp.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -183,13 +183,9 @@ public class ProductsController : ControllerBase
183183
.find(|a| a.name == "Route")
184184
.expect("Route annotation");
185185
assert!(
186-
route
187-
.args
188-
.values()
189-
.any(|v| v.contains("api/[controller]")),
186+
route.args.values().any(|v| v.contains("api/[controller]")),
190187
"route args: {:?}",
191188
route.args
192189
);
193190
}
194191
}
195-

crates/codegraph-extract/src/languages/rust.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,4 +122,3 @@ async fn main() {}
122122
);
123123
}
124124
}
125-

crates/codegraph-graph/src/storage/mysql.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -745,12 +745,13 @@ impl Storage for MySqlStorage {
745745
}
746746

747747
async fn stats(&self) -> Result<IndexCounts> {
748-
let row: Option<(i64, i64, i64, i64, i64)> =
749-
sqlx::query_as("SELECT symbols, chains, edges, files, next_id FROM sg_stats WHERE repo_id = ?")
750-
.bind(self.repo_id as i64)
751-
.fetch_optional(&self.pool)
752-
.await
753-
.map_err(db_err)?;
748+
let row: Option<(i64, i64, i64, i64, i64)> = sqlx::query_as(
749+
"SELECT symbols, chains, edges, files, next_id FROM sg_stats WHERE repo_id = ?",
750+
)
751+
.bind(self.repo_id as i64)
752+
.fetch_optional(&self.pool)
753+
.await
754+
.map_err(db_err)?;
754755
match row {
755756
Some((symbols, chains, edges, files, next_id)) => Ok(IndexCounts {
756757
symbols: symbols as u64,

crates/codegraph-graph/src/storage/postgres.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -757,12 +757,13 @@ impl Storage for PostgresStorage {
757757
}
758758

759759
async fn stats(&self) -> Result<IndexCounts> {
760-
let row: Option<(i64, i64, i64, i64, i64)> =
761-
sqlx::query_as("SELECT symbols, chains, edges, files, next_id FROM sg_stats WHERE repo_id = $1")
762-
.bind(self.repo_id as i64)
763-
.fetch_optional(&self.pool)
764-
.await
765-
.map_err(db_err)?;
760+
let row: Option<(i64, i64, i64, i64, i64)> = sqlx::query_as(
761+
"SELECT symbols, chains, edges, files, next_id FROM sg_stats WHERE repo_id = $1",
762+
)
763+
.bind(self.repo_id as i64)
764+
.fetch_optional(&self.pool)
765+
.await
766+
.map_err(db_err)?;
766767
match row {
767768
Some((symbols, chains, edges, files, next_id)) => Ok(IndexCounts {
768769
symbols: symbols as u64,

crates/codegraph-graph/src/storage/sqlite.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ use codegraph_core::{FileInfo, Symbol};
4242
use sqlx::Row;
4343
use sqlx::sqlite::{SqliteConnectOptions, SqliteJournalMode, SqlitePool, SqlitePoolOptions};
4444

45-
use super::{EMPTY, IndexCounts, Result, Storage, StorageError, Tx, TxOp, decode_vector, encode_vector};
45+
use super::{
46+
EMPTY, IndexCounts, Result, Storage, StorageError, Tx, TxOp, decode_vector, encode_vector,
47+
};
4648
use crate::embeddings::resolve_vss_extensions;
4749

4850
fn db_err(e: sqlx::Error) -> StorageError {

0 commit comments

Comments
 (0)