-
Notifications
You must be signed in to change notification settings - Fork 37
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
Proc-macros: useless conversion Clippy lint #248
Comments
When making custom profiles, I think 128-bit UUID:s is the only way to go. Thus, really would like to have them supported and tested the same as 16-bit. |
Yep, makes sense, I can add that in too. So far I haven't because we support string literals for 128bit UUIDs and that's been enough for me so far. But adding From is possible too, or we can add more types that impl Into<trouble_host::Uuid> |
I think adding |
Perhaps also |
One notion regarding this: source pub enum Uuid {
Uuid16(u16),
Uuid128([u8; 16]),
} Is there a reason the source uses |
I'm going to take a look at this now. |
Consider:
... where, inside
rs-matter
, I have:With
MATTER_BLE_SERVICE_UUID16
everything is great, because trouble'sUuid
hasimpl From<u16> for Uuid
.With c1 and c2 life is not so great, because
Uuid
has neitherimpl From<[u8; 16]> for Uuid
, norimpl From<u128> for Uuid
.Therefore, I have to use the explicit
Uuid::Uuid128(C1_CHARACTERISTIC_UUID.to_be_bytes())
.However, since the proc-macro generated code does internally do
.into()
on myUuid
, Clippy then kicks-in with:I think we either need extra
From<???> for Uuid
impls, or this (and other) Clippy lints disabled in the proc-macros, or ideally both.The text was updated successfully, but these errors were encountered: