Loosen bounds on Text Clone impl
This commit is contained in:
parent
5324eb1024
commit
0a775191ab
1 changed files with 16 additions and 1 deletions
|
|
@ -19,7 +19,7 @@ use std::hash::Hash;
|
|||
/// ```
|
||||
///
|
||||
/// 
|
||||
#[derive(Debug, Clone)]
|
||||
#[derive(Debug)]
|
||||
pub struct Text<Renderer: self::Renderer> {
|
||||
content: String,
|
||||
size: Option<u16>,
|
||||
|
|
@ -239,3 +239,18 @@ where
|
|||
Element::new(text)
|
||||
}
|
||||
}
|
||||
|
||||
impl<Renderer: self::Renderer> Clone for Text<Renderer> {
|
||||
fn clone(&self) -> Self {
|
||||
Self {
|
||||
content: self.content.clone(),
|
||||
size: self.size,
|
||||
color: self.color,
|
||||
font: self.font,
|
||||
width: self.width,
|
||||
height: self.height,
|
||||
horizontal_alignment: self.horizontal_alignment,
|
||||
vertical_alignment: self.vertical_alignment,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue