Derive Clone+Copy for Align, HAlign, VAlign (#469)

Fixes #468
This commit is contained in:
Alex Parrill 2020-07-13 00:17:52 -04:00 committed by GitHub
parent 56008db796
commit afe3123dac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,7 @@
//! Tools to control view alignment. //! Tools to control view alignment.
/// Specifies the alignment along both horizontal and vertical directions. /// Specifies the alignment along both horizontal and vertical directions.
#[derive(Debug)] #[derive(Debug, Clone, Copy)]
pub struct Align { pub struct Align {
/// Horizontal alignment policy /// Horizontal alignment policy
pub h: HAlign, pub h: HAlign,
@ -62,7 +62,7 @@ impl Align {
} }
/// Horizontal alignment /// Horizontal alignment
#[derive(Debug)] #[derive(Debug, Clone, Copy)]
pub enum HAlign { pub enum HAlign {
/// Place the element to the left of available space /// Place the element to the left of available space
Left, Left,
@ -73,7 +73,7 @@ pub enum HAlign {
} }
/// Vertical alignment /// Vertical alignment
#[derive(Debug)] #[derive(Debug, Clone, Copy)]
pub enum VAlign { pub enum VAlign {
/// Place the element at the top of available space /// Place the element at the top of available space
Top, Top,