forge
Explore
Log in

Don't you dare go Hollow

Require Clone for LayoutElement::Id

Browse files at this commit

d640e8515899e552b845cf8f901ebeb126bb12a5Ivan MolodetskikhParent: c8044a9
Now that we have MappedId, this could really be Copy. But it's quite a
big refactor, so for now just require Clone as I'll need it.
src/layout/mod.rsmodified+1 -1
@@ -100,7 +100,7 @@ pub enum ConfigureIntent {
100 100
101 pub trait LayoutElement {101 pub trait LayoutElement {
102 /// Type that can be used as a unique ID of this element.102 /// Type that can be used as a unique ID of this element.
103- type Id: PartialEq + std::fmt::Debug;103+ type Id: PartialEq + std::fmt::Debug + Clone;
104 104
105 /// Unique ID of this element.105 /// Unique ID of this element.
106 fn id(&self) -> &Self::Id;106 fn id(&self) -> &Self::Id;