From 678dc8dd230d4e1a278dc1469dbceca44ae58776 Mon Sep 17 00:00:00 2001 From: Cxarli <10348289+Cxarli@users.noreply.github.com> Date: Sat, 27 May 2017 22:14:35 +0200 Subject: [PATCH] Code cleanup --- TODO.md | 1 + src/atom.rs | 6 ------ src/molecule.rs | 2 ++ 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/TODO.md b/TODO.md index 8f451c1..1cc676d 100644 --- a/TODO.md +++ b/TODO.md @@ -4,6 +4,7 @@ * Acid/Base reactions - Add hydration (ex. CuSO4.5H2O) to molecules - Optimise common data + - Add electrovalence data to atoms - `atoms.rs` * Names for special cases (-oxide etc.) diff --git a/src/atom.rs b/src/atom.rs index 7eef609..3b81d11 100644 --- a/src/atom.rs +++ b/src/atom.rs @@ -68,12 +68,6 @@ impl Properties for Atom { fn name(&self) -> String { - // NOTE: This case is temporary - if self.name == "oxygen" { - // Special suffix - return "oxide".to_owned(); - } - self.name.to_owned() } diff --git a/src/molecule.rs b/src/molecule.rs index c4465a5..13c141d 100644 --- a/src/molecule.rs +++ b/src/molecule.rs @@ -125,6 +125,8 @@ impl Properties for Molecule { fn name(&self) -> String { let mut name = String::new(); + // TODO: Add special cases + // NOTE: https://www.youtube.com/watch?v=mlRhLicNo8Q for compound in &self.compounds { name += &compound.name(); }