User avatar
Soblow Xaselgio dragn_heart @Soblow@eldritch.cafe
2w
Clippy raising warnings on all my tests because... I did not document that the function could panic.

... Yeah? That's the dirting goal?
1
0
0
0
User avatar
Soblow Xaselgio dragn_heart @Soblow@eldritch.cafe
2w
Yummies

github.com/rust-lang/rust-clippy/issues/12265
1
0
0
0
User avatar
[4FBB09] @5225225@furry.engineer
2w
@Soblow yeah, should be able to #[allow] or expect that lint on the tests module though, at least
1
0
0
0
User avatar
Soblow Xaselgio dragn_heart @Soblow@eldritch.cafe
2w
@5225225 Problem is that, on this project, we have test module*s*, so I have to put this allow directive on all imports dragn_happy
1
0
1
0
User avatar
celeste_hearts_lesbianceleste_hearts_transceleste_hearts_demisexual flori_ava_star:~cursor_blinking 🔜@DS26 @star@amazonawaws.com
1w
@Soblow @5225225 nop! neocat_floof_cute neocat_shy one can, in the lib.rs, at the top of the file

#![cfg_attr(test, allow(...))]
2
0
1
0
User avatar
[4FBB09] @5225225@furry.engineer
1w
@star @Soblow though wouldn't you need to run clippy twice then, one with test enabled and one without? i forget if cargo clippy has test on by default
2
0
1
0
User avatar
celeste_hearts_lesbianceleste_hearts_transceleste_hearts_demisexual flori_ava_star:~cursor_blinking 🔜@DS26 @star@amazonawaws.com
1w
@5225225 @Soblow nyonyo, cfg_attr(test, ...) only applies for things compiled under the test environment, such as test modules marked #[cfg(test)], or tests themselves; ...if I am not mistaken
2
0
0
0
User avatar
celeste_hearts_lesbianceleste_hearts_transceleste_hearts_demisexual flori_ava_star:~cursor_blinking 🔜@DS26 @star@amazonawaws.com
1w
@5225225 @Soblow Production code is not compiled in this test environment neobot_salute (again, if I am not mistaken!)
0
0
1
0