Skip to content

Commit

Permalink
fix: fix clippy options (rustflags) (#5667)
Browse files Browse the repository at this point in the history
* fix the config.toml

* fix a little dashboard issue by the way

* fix

Co-authored-by: xxchan <xxchan22f@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Sep 30, 2022
1 parent 1178dbe commit e69ed7a
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 2 deletions.
36 changes: 36 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,24 @@ rustflags = [
"-Ctarget-feature=+avx2",
"--cfg",
"tokio_unstable",
# lints
# TODO: use lint configuration in cargo https://github.com/rust-lang/cargo/issues/5034
"-Funused_must_use",
"-Wclippy::dbg_macro",
"-Wclippy::disallowed_methods",
"-Wclippy::disallowed_types",
"-Wclippy::doc_markdown",
"-Wclippy::explicit_into_iter_loop",
"-Wclippy::explicit_iter_loop",
"-Wclippy::inconsistent_struct_constructor",
"-Wclippy::unused_async",
"-Wclippy::map_flatten",
"-Wclippy::no_effect_underscore_binding",
"-Wclippy::await_holding_lock",
"-Wrustdoc::broken_intra_doc_links",
"-Wfuture_incompatible",
"-Wnonstandard_style",
"-Wrust_2018_idioms",
]

# Remove "-Ctarget-feature=+neon" if your aarch64 target does not support NEON vector extensions
Expand All @@ -16,6 +34,24 @@ rustflags = [
"-Ctarget-feature=+neon",
"--cfg",
"tokio_unstable",
# lints
# TODO: use lint configuration in cargo https://github.com/rust-lang/cargo/issues/5034
"-Funused_must_use",
"-Wclippy::dbg_macro",
"-Wclippy::disallowed_methods",
"-Wclippy::disallowed_types",
"-Wclippy::doc_markdown",
"-Wclippy::explicit_into_iter_loop",
"-Wclippy::explicit_iter_loop",
"-Wclippy::inconsistent_struct_constructor",
"-Wclippy::unused_async",
"-Wclippy::map_flatten",
"-Wclippy::no_effect_underscore_binding",
"-Wclippy::await_holding_lock",
"-Wrustdoc::broken_intra_doc_links",
"-Wfuture_incompatible",
"-Wnonstandard_style",
"-Wrust_2018_idioms",
]

[build]
Expand Down
1 change: 1 addition & 0 deletions dashboard/lib/streamPlan/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ class StreamNode extends Node {
"union",
"deltaIndexJoin",
"expand",
"groupTopN",
])
for (let [type, _] of Object.entries(nodeProto)) {
if (types.has(type)) {
Expand Down
2 changes: 1 addition & 1 deletion src/meta/src/dashboard/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ <h1 class="flex-auto leading-6 font-semibold text-sky-500 dark:text-sky-400">
let currentMvs = new Set
let showAssociateMv = false

const types = new Set(["dynamicFilter", "source", "sink", "project", "projectSet", "filter", "materialize", "localSimpleAgg", "globalSimpleAgg", "hashAgg", "appendOnlyTopN", "hashJoin", "topN", "hopWindow", "merge", "exchange", "chain", "batchPlan", "lookup", "arrange", "lookupUnion", "union", "deltaIndexJoin", "expand"]);
const types = new Set(["dynamicFilter", "source", "sink", "project", "projectSet", "filter", "materialize", "localSimpleAgg", "globalSimpleAgg", "hashAgg", "appendOnlyTopN", "hashJoin", "topN", "hopWindow", "merge", "exchange", "chain", "batchPlan", "lookup", "arrange", "lookupUnion", "union", "deltaIndexJoin", "expand", "groupTopN"]);

const cluster = (type, cluster) => `
<div class="p-6 max-w bg-white rounded-xl shadow-md flex flex-col space-y-1">
Expand Down
2 changes: 1 addition & 1 deletion src/storage/src/hummock/file_cache/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ where
Ok(())
}

pub fn start_batch_writer(&self, item_capacity: usize) -> StoreBatchWriter<K, V> {
pub fn start_batch_writer(&self, item_capacity: usize) -> StoreBatchWriter<'_, K, V> {
StoreBatchWriter::new(self, self.block_size, self.buffer_capacity, item_capacity)
}

Expand Down

0 comments on commit e69ed7a

Please sign in to comment.