-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Stricter layer renaming handling #254
Conversation
9fa7af8
to
e861df7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, a couple little comments inline. Is get_or_create
worth keeping? It was intended as a convenience method but now it's just seeming uglier and uglier :/
/// 1. `name` is empty or if it contains any [control characters]. | ||
/// 2. `name` is the default layer name but the default layer has a | ||
/// different name. Use [`Self::default_layer`] or | ||
/// [`Self::default_layer_mut`] instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with this getting so complicated I wonder if we should just remove get_or_create
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively we could just return the default layer if the user passes the default layer name, even if the default layer has another name? idk
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm. I made the method for two particular calls in my custom to-UFO converter thing. I suppose I could make it work without the method. Shall I remove it in this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll do it in a separate PR.
Broken out of #251 to ease reviewing.
Closes #253