Skip to content

Commit cd147f6

Browse files
Web3NLclaude
andcommitted
fix(my-canister-frontend): resolve clippy warnings from previous changes
- Wrap constant assertion in const block - Remove redundant ..Default::default() from FrontendConfig literals (struct now has only one field) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 35a6c1b commit cd147f6

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

packages-rs/my-canister-frontend/src/asset_router.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ mod tests {
292292

293293
#[test]
294294
fn max_file_size_is_below_2mib() {
295-
assert!(MAX_FILE_SIZE < 2 * 1024 * 1024);
295+
const { assert!(MAX_FILE_SIZE < 2 * 1024 * 1024) };
296296
assert_eq!(MAX_FILE_SIZE, 2 * 1024 * 1024 - 16 * 1024);
297297
}
298298

@@ -651,7 +651,6 @@ mod tests {
651651
fn allows_extra_extension() {
652652
let config = FrontendConfig {
653653
extra_allowed_extensions: vec!["webmanifest".to_string()],
654-
..Default::default()
655654
};
656655
assert!(validate_asset("/manifest.webmanifest", 100, &config).is_ok());
657656
}
@@ -660,7 +659,6 @@ mod tests {
660659
fn extra_extension_case_insensitive() {
661660
let config = FrontendConfig {
662661
extra_allowed_extensions: vec!["WebManifest".to_string()],
663-
..Default::default()
664662
};
665663
assert!(validate_asset("/manifest.webmanifest", 100, &config).is_ok());
666664
}

0 commit comments

Comments
 (0)