Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
xxchan committed Sep 9, 2023
1 parent ab8c61c commit 3d3f863
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/ctl/src/cmd_impl/scale/resize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ pub async fn resize(ctl_ctx: &CtlContext, scale_ctx: ScaleCommandContext) -> any
(_, Some(_)) if include_worker_ids.is_empty() => {
fail!("Cannot specify target parallelism per worker without including any worker")
}
(Some(target), _) if target == 0 => fail!("Target parallelism must be greater than 0"),
(Some(0), _) => fail!("Target parallelism must be greater than 0"),
_ => {}
}

Expand Down
2 changes: 2 additions & 0 deletions src/meta/src/hummock/compaction/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#![expect(clippy::arc_with_non_send_sync, reason = "FIXME: later")]

pub mod compaction_config;
mod level_selector;
mod overlap_strategy;
Expand Down
3 changes: 0 additions & 3 deletions src/stream/src/common/log_store/in_mem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ impl LogStoreFactory for BoundedInMemLogStoreFactory {
type Reader = BoundedInMemLogStoreReader;
type Writer = BoundedInMemLogStoreWriter;

#[expect(clippy::unused_async)]
async fn build(self) -> (Self::Reader, Self::Writer) {
let (init_epoch_tx, init_epoch_rx) = oneshot::channel();
let (item_tx, item_rx) = channel(self.bound);
Expand Down Expand Up @@ -164,7 +163,6 @@ impl LogReader for BoundedInMemLogStoreReader {
}
}

#[expect(clippy::unused_async)]
async fn truncate(&mut self) -> LogStoreResult<()> {
let sealed_epoch = match self.epoch_progress {
Consuming(_) => unreachable!("should be awaiting truncate"),
Expand All @@ -184,7 +182,6 @@ impl LogReader for BoundedInMemLogStoreReader {
}

impl LogWriter for BoundedInMemLogStoreWriter {
#[expect(clippy::unused_async)]
async fn init(&mut self, epoch: EpochPair) -> LogStoreResult<()> {
let init_epoch_tx = self.init_epoch_tx.take().expect("cannot be init for twice");
init_epoch_tx
Expand Down
1 change: 0 additions & 1 deletion src/stream/src/common/log_store/kv_log_store/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ impl<S: StateStore> LogReader for KvLogStoreReader<S> {
})
}

#[expect(clippy::unused_async)]
async fn truncate(&mut self) -> LogStoreResult<()> {
self.rx.truncate();
Ok(())
Expand Down
1 change: 0 additions & 1 deletion src/stream/src/common/log_store/kv_log_store/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ impl<LS: LocalStateStore> LogWriter for KvLogStoreWriter<LS> {
Ok(())
}

#[expect(clippy::unused_async)]
async fn update_vnode_bitmap(&mut self, new_vnodes: Arc<Bitmap>) -> LogStoreResult<()> {
self.serde.update_vnode_bitmap(new_vnodes.clone());
self.tx.update_vnode(self.state_store.epoch(), new_vnodes);
Expand Down

0 comments on commit 3d3f863

Please sign in to comment.