-
-
Notifications
You must be signed in to change notification settings - Fork 174
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
Don't implement Copy
on certain BoxedInline structs
#1532
Comments
That makes sense, yes. We should check other types that currently implement Can you create an MR and go over these? |
A quick look on
In
|
Copy
on GtkTextIterCopy
on certain BoxedInline structs
Only ones that have no copy/clear function are The ones you listed seem all OK (gtk-rs-core). For gtk4-rs I'll let @bilelmoussaoui comment. |
Not sure how to handle this one
But the type also provides a copy function?
This was fixed already |
For TextIter, see also #1280 |
Currently, it implements
Copy
, which could cause unexpected behaviors. I think it is better to just implementClone
, so the user can explicitly create a copy of the iterator.This is also the reason why
Range
from std lib doesn't implementCopy
, even though the underlying type implements copy.Example:
Does
text_end
also move backward a line? (Spoiler: it does not, since it is creating a copy behind the scenes)Here, it is explicit that we are making a deep copy of the
text_end
.The text was updated successfully, but these errors were encountered: