-
-
Notifications
You must be signed in to change notification settings - Fork 60
Add clone macro #527
Add clone macro #527
Conversation
|
@sdroege @EPashkin @GuillaumeGomez I think this is ready for another round of review. |
|
Tests fail because I use |
|
So, there's a problem when implementing the trait in the other crates: |
You only have to implement it on the final type, not on all types in the class hierarchy. Otherwise you'd implement it multiple times for the same type anyway. |
|
@antoyo You're going to work on the remaining parts? |
|
@sdroege: I won't have time soon. |
ff3a013 to
90eb5ec
Compare
…s and run rustfmt
|
Should be good to go now |
|
@GuillaumeGomez Green! |
|
@GuillaumeGomez Also let me know if you want me to merge it ;) |
src/clone.rs
Outdated
| }; | ||
| } | ||
|
|
||
| /// Macro for passing variables as strong or weak references into a closure. |
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.
"variables as strong" -> there is one extra whitespace after "variables".
src/clone.rs
Outdated
| /// returned. | ||
| /// | ||
| /// ### Passing a strong reference | ||
| /// ```rust |
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.
Please add an empty line before the example (makes the code simpler to read).
src/clone.rs
Outdated
| /// ``` | ||
| /// | ||
| /// ### Passing a strong and weak reference | ||
| /// ```rust |
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.
Please add an empty line before the example (makes the code simpler to read).
src/clone.rs
Outdated
| /// ``` | ||
| /// | ||
| /// ### Providing a default return value if upgrading a weak reference fails | ||
| /// ```rust |
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.
Please add an empty line before the example (makes the code simpler to read).
No description provided.