Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Cxarli committed Jul 8, 2021
1 parent 0702557 commit 678dc8d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
1 change: 1 addition & 0 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.)
Expand Down
6 changes: 0 additions & 6 deletions src/atom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down
2 changes: 2 additions & 0 deletions src/molecule.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 678dc8d

Please sign in to comment.