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
{{ message }}
Repository navigation
Cleanup predefined type for list-style-image #19571
As both of them use the same function specified::ListStyleImage::none(), it makes sense to not have them both needed, but seems to be tied on the shorthand implementation that uses unwrap_or_initial!, which calls get_initial_specified_value unless a different function is specified on the helper parameter.
Hmm, so I don't think this is too trivial to simplify. In particular, we want a specified value for the shorthand, but not for the longhand... Do you have any idea on how to clean it up? We can of course expand it manually to use none, that may not be too bad...
If that's the case, feel free to close it. I agree with not putting a lot of effort to minimal benefit.
I don't have the knowledge yet on how the whole thing works, but I'm getting to understand the whole shorthand/longhand thing :)
Yeah, it's not clear to me what's the best way to simplify this. We could try initial_computed_value if there's no initial_specified_value, but I'm not sure it's worth it, given it seems a bit more magical and needs more python stuff which we're generally trying to remove :)
Activity
emilio commentedon Dec 15, 2017
Hmm, so I don't think this is too trivial to simplify. In particular, we want a specified value for the shorthand, but not for the longhand... Do you have any idea on how to clean it up? We can of course expand it manually to use
none, that may not be too bad...emilio commentedon Dec 15, 2017
(Even though I think it's not worth to do this to save a single line of code there, you end up repeating
nonein other places :/)fenak commentedon Dec 15, 2017
If that's the case, feel free to close it. I agree with not putting a lot of effort to minimal benefit.
I don't have the knowledge yet on how the whole thing works, but I'm getting to understand the whole shorthand/longhand thing :)
emilio commentedon Dec 15, 2017
Yeah, it's not clear to me what's the best way to simplify this. We could try
initial_computed_valueif there's noinitial_specified_value, but I'm not sure it's worth it, given it seems a bit more magical and needs more python stuff which we're generally trying to remove :)