Closed
Description
What it does
None of the examples in Rust guidelines on writing tests start functions with test_
, which makes for better code quality since tests::foo
is more readable than tests::test_foo
Somewhat related to: clippy::module_name_repetitions
Lint Name
test_name_repetitions
Category
pedantic
Advantage
Make the code match Rust guidelines thus making it more idiomatic
Drawbacks
Not sure
Example
#[cfg(test)]
mod tests {
#[test]
fn test_foo() {
assert!(true);
}
}
Could be written as:
rust
#[cfg(test)]
mod tests {
#[test]
fn foo() {
assert!(true);
}
}