Replies: 1 comment
-
Sounds like a great idea, and probably not too hard to have. This change ought to go into |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
New contributor here, first of all congratulations on a great project!
I've used
cargo mutants
on a fairly large codebase (12kloc). One of the things that appear regularly on my project is to preallocate memory for some data structures. For instance, we use things likelet v = Vec::with_capacity(a+b);
. Obviously,cargo-mutants
is generating a mutation for the argument, into things likea-b
ora*b
. However, this won't break any tests, as it doesn't actually introduce a bug in functionality, only the memory allocation footprint may be different.My proposal is to remove the generation of mutations for the
.with_capacity
parameter, for all the structs instd::collections
, and perhaps not only. I would gladly attempt an implementation, if this proposal is well received.Beta Was this translation helpful? Give feedback.
All reactions