mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-27 19:26:09 +00:00
Derive Default for XY (#509)
This patch derives Default for XY<T>. This makes it easier to deal with types like XY<usize>.
This commit is contained in:
parent
f694e2ae25
commit
02ce9f8a35
@ -2,7 +2,7 @@ use crate::direction::Orientation;
|
|||||||
use std::iter;
|
use std::iter;
|
||||||
|
|
||||||
/// A generic structure with a value for each axis.
|
/// A generic structure with a value for each axis.
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq, Hash)]
|
||||||
pub struct XY<T> {
|
pub struct XY<T> {
|
||||||
/// X-axis value
|
/// X-axis value
|
||||||
pub x: T,
|
pub x: T,
|
||||||
|
Loading…
Reference in New Issue
Block a user