mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 07:41:12 +00:00
Run linter
This commit is contained in:
parent
f7a055fc78
commit
9f72b2710f
9 changed files with 66 additions and 32 deletions
|
@ -32,6 +32,7 @@ impl<'a> Formattable for Pattern<'a> {
|
|||
| Pattern::PrivateTag(_)
|
||||
| Pattern::Apply(_, _)
|
||||
| Pattern::NumLiteral(..)
|
||||
| Pattern::IntLiteral(..)
|
||||
| Pattern::NonBase10Literal { .. }
|
||||
| Pattern::FloatLiteral(..)
|
||||
| Pattern::StrLiteral(_)
|
||||
|
@ -116,21 +117,28 @@ impl<'a> Formattable for Pattern<'a> {
|
|||
loc_pattern.format(buf, indent);
|
||||
}
|
||||
|
||||
NumLiteral(string, bound) => {
|
||||
&NumLiteral(string, bound) => {
|
||||
buf.indent(indent);
|
||||
buf.push_str(string);
|
||||
if let &NumericBound::Exact(width) = bound {
|
||||
if let NumericBound::Exact(width) = bound {
|
||||
buf.push_str(&width.to_string());
|
||||
}
|
||||
}
|
||||
NonBase10Literal {
|
||||
&IntLiteral(string, bound) => {
|
||||
buf.indent(indent);
|
||||
buf.push_str(string);
|
||||
if let NumericBound::Exact(width) = bound {
|
||||
buf.push_str(&width.to_string());
|
||||
}
|
||||
}
|
||||
&NonBase10Literal {
|
||||
base,
|
||||
string,
|
||||
is_negative,
|
||||
bound,
|
||||
} => {
|
||||
buf.indent(indent);
|
||||
if *is_negative {
|
||||
if is_negative {
|
||||
buf.push('-');
|
||||
}
|
||||
|
||||
|
@ -143,14 +151,14 @@ impl<'a> Formattable for Pattern<'a> {
|
|||
|
||||
buf.push_str(string);
|
||||
|
||||
if let &NumericBound::Exact(width) = bound {
|
||||
if let NumericBound::Exact(width) = bound {
|
||||
buf.push_str(&width.to_string());
|
||||
}
|
||||
}
|
||||
FloatLiteral(string, bound) => {
|
||||
&FloatLiteral(string, bound) => {
|
||||
buf.indent(indent);
|
||||
buf.push_str(string);
|
||||
if let &NumericBound::Exact(width) = bound {
|
||||
if let NumericBound::Exact(width) = bound {
|
||||
buf.push_str(&width.to_string());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue