From 0c201410b757c7b0622473675e28c31ae5b2202a Mon Sep 17 00:00:00 2001 From: Nilstrieb Date: Sun, 19 Sep 2021 14:24:36 +0200 Subject: [PATCH] remove impl std::fmt::Display for Stmt --- src/stmt.rs | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/stmt.rs b/src/stmt.rs index a44106d..782cc71 100644 --- a/src/stmt.rs +++ b/src/stmt.rs @@ -1,6 +1,5 @@ use std::collections::HashMap; -use std::fmt::Formatter; -use std::num::ParseIntError; +ouse std::num::ParseIntError; /// A span referencing the line where a statement came from. Starts at 0 #[derive(Debug, Copy, Clone, Ord, PartialOrd, Eq, PartialEq, Hash)] @@ -234,16 +233,3 @@ fn parse_line(line: &str) -> Result { } }) } - -impl std::fmt::Display for Stmt { - fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { - match self { - Stmt::Inc(r) => write!(f, "INC {}", r)?, - Stmt::Dec(r) => write!(f, "DEC {}", r)?, - Stmt::IsZero(r, line) => write!(f, "IS_ZERO {} {}", r, line)?, - Stmt::Jump(r) => write!(f, "JUMP {}", r)?, - Stmt::Stop => write!(f, "STOP")?, - } - Ok(()) - } -}