mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-23 08:55:40 +01:00
chore: enable all features in clippy ci and fix more clippy lints
This commit is contained in:
2
.github/workflows/rust.yml
vendored
2
.github/workflows/rust.yml
vendored
@@ -46,7 +46,7 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Clippy
|
||||
run: |
|
||||
cargo clippy -- -A clippy::all -W clippy::correctness -W clippy::perf -W clippy::suspicious --deny=warnings
|
||||
cargo clippy --all-targets --all-features -- -A clippy::all -W clippy::correctness -W clippy::perf -W clippy::suspicious --deny=warnings
|
||||
|
||||
build-wasm:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
@@ -18,6 +18,7 @@ fn bench(c: &mut Criterion) {
|
||||
fn limbo_bench(criterion: &mut Criterion) {
|
||||
let mut group = criterion.benchmark_group("limbo");
|
||||
group.throughput(Throughput::Elements(1));
|
||||
#[allow(clippy::arc_with_non_send_sync)]
|
||||
let io = Arc::new(PlatformIO::new().unwrap());
|
||||
let db = Database::open_file(io.clone(), "../testing/testing.db").unwrap();
|
||||
let conn = db.connect();
|
||||
|
||||
@@ -122,7 +122,7 @@ mod tests {
|
||||
let path = json_path(value);
|
||||
|
||||
match path {
|
||||
Err(crate::error::LimboError::Constraint(e)) => {
|
||||
Err(crate::error::LimboError::Constraint(_)) => {
|
||||
// happy path
|
||||
}
|
||||
_ => panic!("Expected error for: {:?}, got: {:?}", value, path),
|
||||
|
||||
@@ -10,7 +10,7 @@ readme = "README.md"
|
||||
categories = ["parser-implementations"]
|
||||
keywords = ["sql", "parser", "scanner", "tokenizer"]
|
||||
license = "Apache-2.0/MIT"
|
||||
build = "build.rs" # Lemon preprocessing
|
||||
build = "build.rs" # Lemon preprocessing
|
||||
|
||||
[badges]
|
||||
maintenance = { status = "experimental" }
|
||||
@@ -41,3 +41,7 @@ cc = "1.0"
|
||||
phf_shared = { version = "0.11", features = ["uncased"] }
|
||||
phf_codegen = "0.11"
|
||||
uncased = "0.9.10"
|
||||
|
||||
[lints.rust]
|
||||
dead_code = "allow"
|
||||
non_snake_case = "allow"
|
||||
|
||||
@@ -354,8 +354,8 @@ impl yyParser<'_> {
|
||||
** is in state X and has a lookahead token Y. In a well-tested
|
||||
** systems, every element of this matrix should end up being set.
|
||||
*/
|
||||
#[cfg(feature = "YYCOVERAGE")]
|
||||
static yycoverage: [[bool; YYNTOKEN]; YYNSTATE] = [];
|
||||
// #[cfg(feature = "YYCOVERAGE")]
|
||||
// static yycoverage: [[bool; YYNTOKEN]; YYNSTATE] = [];
|
||||
|
||||
/*
|
||||
** Write into out a description of every state/lookahead combination that
|
||||
@@ -368,7 +368,7 @@ static yycoverage: [[bool; YYNTOKEN]; YYNSTATE] = [];
|
||||
#[cfg(feature = "YYCOVERAGE")]
|
||||
fn ParseCoverage(/*FILE *out*/) -> i32 {
|
||||
//int stateno, iLookAhead, i;
|
||||
let mut nMissed = 0;
|
||||
let nMissed = 0;
|
||||
/*for(stateno=0; stateno<YYNSTATE; stateno++){
|
||||
i = yy_shift_ofst[stateno];
|
||||
for(iLookAhead=0; iLookAhead<YYNTOKEN; iLookAhead++){
|
||||
|
||||
Reference in New Issue
Block a user