Misc cleaning up

This commit is contained in:
Chad Stearns 2020-03-29 14:27:21 -04:00
parent a19287f657
commit a00ed8a1ca
3 changed files with 6 additions and 5 deletions

View file

@ -230,9 +230,9 @@ impl ModuleId {
#[cfg(debug_assertions)]
pub fn name(self) -> Box<str> {
let names =
DEBUG_MODULE_ID_NAMES
.lock()
.expect("Failed to acquire lock for Debug reading from DEBUG_MODULE_ID_NAMES, presumably because a thread panicked.");
DEBUG_MODULE_ID_NAMES
.lock()
.expect("Failed to acquire lock for Debug reading from DEBUG_MODULE_ID_NAMES, presumably because a thread panicked.");
match names.get(&self.0) {
Some(str_ref) => str_ref.clone(),

View file

@ -122,6 +122,7 @@ pub enum ReportText {
/// The documentation for this symbol.
Docs(Symbol),
/// Many ReportText that should be concatenated together.
Batch(Vec<ReportText>),
}

View file

@ -417,7 +417,7 @@ mod test_report {
isDisabled = \user -> user.isAdmin
theAdmin
|> isDabled
|> isDisabled
"#
),
to_simple_report(Region(roc_region::all::Region {
@ -431,7 +431,7 @@ mod test_report {
<cyan>1<reset><magenta> <reset> <white>isDisabled = \user -> user.isAdmin<reset>
<cyan>2<reset><magenta> <reset>
<cyan>3<reset><magenta> <reset> <white>theAdmin<reset>
<cyan>4<reset><magenta> <reset> <white> |> isDabled<reset>"#
<cyan>4<reset><magenta> <reset> <white> |> isDisabled<reset>"#
),
);
}