-
Notifications
You must be signed in to change notification settings - Fork 490
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
feat: Add deref_or
and destruct
to Nullable
, add destruct
to Box
#3854
Comments
deref_or
and destruct
to Nullable
deref_or
and destruct
to Nullable
, add destruct
to Box
The destruct part would probably require additional features in the language,
|
Hm, I don't really get it. What would be the correct way of deriving |
you'd need to have a specific one - not a generic one. The issue is this: If you have both a Drop and Destruct for the nullable - type, anywhere that requires a destruct, would have 2 impls of destruct for nullable, and would not know which one to choose. Currently - just adding a specific Destruct impl for the |
Okay, indeed that's whay I ended up doing; thanks :) |
Feature Request
fn deref(self: Nullable<T>, value: T) -> T
toNullableTrait
to either deref a Nullable or return the provided valueDestruct
implementation innullable.cairo
Destruct
implementation inbox.cairo
Describe the Feature Request
Describe Preferred Solution
Describe Alternatives
Related Code
Additional Context
If the feature request is approved, would you be willing to submit a PR?
(Help can be provided if you need assistance submitting a PR)
The text was updated successfully, but these errors were encountered: