Skip to content

Commit

Permalink
Fix clippy::unreadable_literal
Browse files Browse the repository at this point in the history
  • Loading branch information
SchahinRohani committed Oct 7, 2024
1 parent 553f33c commit f1efa62
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -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
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.toml=//:clippy.toml

test --@rules_rust//:rustfmt.toml=//:.rustfmt.toml
Expand Down
4 changes: 2 additions & 2 deletions nativelink-store/src/redis_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -594,9 +594,9 @@ return new_version
/// being a valid CRC32 checksum, just that it's a unique identifier with a low chance of
/// collision.
const fn fingerprint_create_index_template() -> u32 {
const POLY: u32 = 0xEDB88320;
const POLY: u32 = 0xEDB8_8320;
const DATA: &[u8] = get_create_index_template!().as_bytes();
let mut crc = 0xFFFFFFFF;
let mut crc = 0xFFFF_FFFF;
let mut i = 0;
while i < DATA.len() {
let byte = DATA[i];
Expand Down
2 changes: 1 addition & 1 deletion nativelink-store/tests/shard_store_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ async fn upload_download_has_check() -> Result<(), Error> {
#[nativelink_test]
async fn weights_send_to_proper_store() -> Result<(), Error> {
// Very low chance anything will ever go to second store due to weights being so much diff.
let (shard_store, stores) = make_stores(&[100000, 1]);
let (shard_store, stores) = make_stores(&[100_000, 1]);

let original_data1 = make_random_data(MEGABYTE_SZ);
let digest1 = DigestInfo::try_new(STORE1_HASH, 100).unwrap();
Expand Down

0 comments on commit f1efa62

Please sign in to comment.