From 3313ad05fa3374cbac6a9144221f4412f609be51 Mon Sep 17 00:00:00 2001 From: Richard Feldman Date: Fri, 3 Apr 2020 00:47:21 -0400 Subject: [PATCH] Simplify some report helpers --- compiler/reporting/src/report.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/compiler/reporting/src/report.rs b/compiler/reporting/src/report.rs index 6c9dc3b54c..7d87500030 100644 --- a/compiler/reporting/src/report.rs +++ b/compiler/reporting/src/report.rs @@ -195,21 +195,19 @@ pub enum ReportText { } pub fn plain_text(str: &str) -> ReportText { - use ReportText::*; - - Plain(Box::from(str)) + ReportText::Plain(Box::from(str)) } pub fn em_text(str: &str) -> ReportText { - use ReportText::*; + ReportText::EmText(Box::from(str)) +} - EmText(Box::from(str)) +pub fn code_text(str: &str) -> ReportText { + ReportText::Code(Box::from(str)) } pub fn url(str: &str) -> ReportText { - use ReportText::*; - - Url(Box::from(str)) + ReportText::Url(Box::from(str)) } pub fn with_indent(n: usize, report_text: ReportText) -> ReportText {