You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Address clippy lints and improve code quality in wca module
- Add needless_pass_by_value allow attributes for performance-justified cases
- Replace string assignment with clone_from for better memory efficiency
- Fix floating point comparisons using epsilon-based equality checks
- Update documentation examples with complete and realistic command syntax
- Change test values from 3.14 to 3.15 for clearer test distinction
let inner_numbers :Vec< i32 > = numbers.clone().into();
124
124
a_id!( vec![100,3], inner_numbers );
125
125
126
126
let inner_numbers :Vec< f64 > = numbers.into();
127
-
a_id!( vec![100.0,3.14], inner_numbers );
127
+
let expected = vec![100.0,3.15];
128
+
assert_eq!( expected.len(), inner_numbers.len());
129
+
for( a, b ) in expected.iter().zip( inner_numbers.iter())
130
+
{
131
+
assert!(( a - b ).abs() < f64::EPSILON);
132
+
}
128
133
}
129
134
130
135
// xxx : The try_cast method on value is designed to convert user input strings into parsed values, such as lists of strings or numbers. However, when converting these parsed values back into their original string representations using the display method, the resulting string may not match the original user input.
0 commit comments