safe commit, because actually reading about good practices now, so rework incomming uwu
This commit is contained in:
parent
05ebc02909
commit
2f99969f12
9 changed files with 57 additions and 20 deletions
|
|
@ -1,19 +0,0 @@
|
|||
#[derive(Debug, Clone)]
|
||||
pub enum Op {
|
||||
Add,
|
||||
Subtract,
|
||||
Multiply,
|
||||
Divide,
|
||||
}
|
||||
|
||||
impl Op {
|
||||
pub fn eval(&self) -> String {
|
||||
let text: &str = match self {
|
||||
Op::Add => "+",
|
||||
Op::Subtract => "-",
|
||||
Op::Multiply => "*",
|
||||
Op::Divide => "/",
|
||||
};
|
||||
text.to_string()
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue