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
letmut r = String::with_capacity(s.len() + replacement.len());
The String::with_capacity isn't wrong, and it's probably slightly beneficial to have there, but the side effects are subtle and it's probably asking too much to test it. (Actually, in this specific case we could debug_assert the capacity to shush it, but that's a bit messy.)
We cannot yet add a #[mutants::skip] here, because expression attributes aren't stable yet (rust-lang/rust#15701).
Maybe it would be useful to have config that can match against the whole expression text and then skip; that would probably help in other cases of code that only has unimportant side effects such as trace statements.
The text was updated successfully, but these errors were encountered:
cargo-mutants/src/span.rs
Line 103 in b2a4bd1
The
String::with_capacity
isn't wrong, and it's probably slightly beneficial to have there, but the side effects are subtle and it's probably asking too much to test it. (Actually, in this specific case we coulddebug_assert
the capacity to shush it, but that's a bit messy.)We cannot yet add a
#[mutants::skip]
here, because expression attributes aren't stable yet (rust-lang/rust#15701).Maybe it would be useful to have config that can match against the whole expression text and then skip; that would probably help in other cases of code that only has unimportant side effects such as trace statements.
The text was updated successfully, but these errors were encountered: