mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 00:01:16 +00:00
Simplify some report helpers
This commit is contained in:
parent
bb2ececda4
commit
3313ad05fa
1 changed files with 6 additions and 8 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue