make Element struct implement Copy and Clone trait

This commit is contained in:
fabolous005 2023-11-22 23:13:11 +01:00
parent 2d8040cd19
commit b6ead0f477

View File

@ -1,5 +1,5 @@
/// Contains the information of a single element /// Contains the information of a single element
#[derive(Debug)] #[derive(Debug, Copy, Clone)]
pub struct Element { pub struct Element {
pub atomic_number: u32, pub atomic_number: u32,
pub atomic_group: Option<u32>, pub atomic_group: Option<u32>,
@ -25,20 +25,20 @@ pub struct Element {
} }
/// The three possible states /// The three possible states
#[derive(Debug)] #[derive(Debug, Copy, Clone)]
pub enum State { pub enum State {
Solid, Solid,
Liquid, Liquid,
Gas, Gas,
} }
#[derive(Debug)] #[derive(Debug, Copy, Clone)]
pub struct IonRadius { pub struct IonRadius {
pub radius: f32, pub radius: f32,
pub variation: &'static str, pub variation: &'static str,
} }
#[derive(Debug)] #[derive(Debug, Copy, Clone)]
pub enum Year { pub enum Year {
Ancient, Ancient,
Known(u16), Known(u16),