From f68360550613323602e36a4121bf2b003e7b5fc5 Mon Sep 17 00:00:00 2001 From: Schahin Rouhanizadeh Date: Mon, 7 Oct 2024 04:27:14 +0200 Subject: [PATCH] Fix clippy::range_plus_one --- .bazelrc | 2 +- nativelink-store/tests/s3_store_test.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.bazelrc b/.bazelrc index e96a3eb47..d62b56a65 100644 --- a/.bazelrc +++ b/.bazelrc @@ -45,7 +45,7 @@ build --aspects=@rules_rust//rust:defs.bzl%rustfmt_aspect build --aspects=@rules_rust//rust:defs.bzl%rust_clippy_aspect # TODO(aaronmondal): Extend these flags until we can run with clippy::pedantic. -build --@rules_rust//:clippy_flags=-Dwarnings,-Dclippy::uninlined_format_args,-Dclippy::manual_string_new,-Dclippy::manual_let_else,-Dclippy::single_match_else,-Dclippy::redundant_closure_for_method_calls,-Dclippy::semicolon_if_nothing_returned,-Dclippy::unreadable_literal +build --@rules_rust//:clippy_flags=-Dwarnings,-Dclippy::uninlined_format_args,-Dclippy::manual_string_new,-Dclippy::manual_let_else,-Dclippy::single_match_else,-Dclippy::redundant_closure_for_method_calls,-Dclippy::semicolon_if_nothing_returned,-Dclippy::unreadable_literal,-Dclippy::range_plus_one build --@rules_rust//:clippy.toml=//:clippy.toml test --@rules_rust//:rustfmt.toml=//:.rustfmt.toml diff --git a/nativelink-store/tests/s3_store_test.rs b/nativelink-store/tests/s3_store_test.rs index b2e1ac669..e91f6900e 100644 --- a/nativelink-store/tests/s3_store_test.rs +++ b/nativelink-store/tests/s3_store_test.rs @@ -243,7 +243,7 @@ async fn simple_update_ac() -> Result<(), Error> { let spawn_fut = spawn!("simple_update_ac", async move { tokio::try_join!(update_fut, async move { for i in 0..CONTENT_LENGTH { - tx.send(send_data_copy.slice(i..(i + 1))).await?; + tx.send(send_data_copy.slice(i..=i)).await?; } tx.send_eof() })