Skip to content

Commit 3e73891

Browse files
committed
fix clippy
Signed-off-by: simonsan <[email protected]>
1 parent 4b3d327 commit 3e73891

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

crates/core/src/blob/packer.rs

+6-3
Original file line numberDiff line numberDiff line change
@@ -1104,8 +1104,10 @@ mod tests {
11041104

11051105
#[fixture]
11061106
fn pack_sizer() -> PackSizer {
1107-
let mut config = ConfigFile::default();
1108-
config.max_packsize_tolerate_percent = Some(80);
1107+
let config = repofile::configfile::ConfigFile {
1108+
max_packsize_tolerate_percent: Some(80),
1109+
..Default::default()
1110+
};
11091111
let blob_type = BlobType::Data;
11101112
let current_size = 100;
11111113
PackSizer::from_config(&config, blob_type, current_size)
@@ -1139,6 +1141,7 @@ mod tests {
11391141
#[case(0.5f32, false, "size is too small, should be 'false'")]
11401142
#[case(1.1f32, true, "size is ok, should be 'true'")]
11411143
#[case(1_000_000.0f32, false, "size is too huge: should be 'false'")]
1144+
#[allow(clippy::cast_possible_truncation)]
11421145
fn test_compute_pack_size_ok_passes(
11431146
pack_sizer: PackSizer,
11441147
#[case] input: f32,
@@ -1149,7 +1152,7 @@ mod tests {
11491152

11501153
let size = (input * size_limit as f32) as u32;
11511154

1152-
assert_eq!(pack_sizer.size_ok(size)?, expected, "{}", comment);
1155+
assert_eq!(pack_sizer.size_ok(size)?, expected, "{comment}");
11531156

11541157
Ok(())
11551158
}

0 commit comments

Comments
 (0)