-
-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unify constructors accepting names #2071
Comments
First is good to me |
There is also actually another option here:
This might be the most idiomatic if we allow for non-static names. |
I don't think |
Can you specify what scenario you're thinking of? |
I mean just in general? Like, this guy? LibAFL/libafl_targets/src/coverage.rs Line 190 in 2df71e7
|
Right, that's how it's stored internally, not how we accept it as a parameter 😅 |
But users may want to pass in names dynamically (maybe?) |
To be applied after #2065
We currently use each of the following in constructors for
Named
types:&'static str
String
Cow<'static, str>
S
withwhere S: Into<String>
S
withwhere S: Into<Cow<'static, str>>
We should unify this to a common interface. My vote is personally for the first, since we can enforce that people statically name their observers (which is generally preferable). If there are legitimate reasons we can think of that people might not want to, then we should go with the last (which uses the new Copy-on-Write pattern we're introducing in #2065).
The text was updated successfully, but these errors were encountered: