diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..35eb1dd
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/multifile.rs b/examples/multifile.rs
index 201160b..feebe9d 100644
--- a/examples/multifile.rs
+++ b/examples/multifile.rs
@@ -25,10 +25,10 @@ fn main() {
.with_message(format!("Original definition of {} is here", "five".fg(a)))
.with_color(a))
.with_note(format!("{} is a number and can only be added to other numbers", "Nat".fg(a)))
- .finish()
- .print(sources(vec![
+ .finish(sources(vec![
("a.tao", include_str!("a.tao")),
("b.tao", include_str!("b.tao")),
]))
+ .print()
.unwrap();
}
diff --git a/examples/multiline.rs b/examples/multiline.rs
index ad2a77a..acf1f60 100644
--- a/examples/multiline.rs
+++ b/examples/multiline.rs
@@ -37,7 +37,7 @@ fn main() {
))
.with_color(out2))
.with_note(format!("Outputs of {} expressions must coerce to the same type", "match".fg(out)))
- .finish()
- .print(("sample.tao", Source::from(include_str!("sample.tao"))))
+ .finish(("sample.tao", Source::from(include_str!("sample.tao"))))
+ .print()
.unwrap();
}
diff --git a/examples/simple.rs b/examples/simple.rs
index 5f2002c..5b14099 100644
--- a/examples/simple.rs
+++ b/examples/simple.rs
@@ -6,8 +6,8 @@ fn main() {
.with_message("Incompatible types")
.with_label(Label::new(32..33).with_message("This is of type Nat"))
.with_label(Label::new(42..45).with_message("This is of type Str"))
- .finish()
- .print(Source::from(include_str!("sample.tao")))
+ .finish(Source::from(include_str!("sample.tao")))
+ .print()
.unwrap();
const SOURCE: &str = "a b c d e f";
@@ -19,7 +19,7 @@ fn main() {
.with_label(Label::new(2..3).with_color(Color::Blue).with_message("`b` for banana").with_order(1))
.with_label(Label::new(4..5).with_color(Color::Green))
.with_label(Label::new(7..9).with_color(Color::Cyan).with_message("`e` for emerald"))
- .finish()
- .print(Source::from(SOURCE))
+ .finish(Source::from(SOURCE))
+ .print()
.unwrap();
}
diff --git a/examples/stresstest.rs b/examples/stresstest.rs
index 0fc9d5f..b29a887 100644
--- a/examples/stresstest.rs
+++ b/examples/stresstest.rs
@@ -53,7 +53,7 @@ fn main() {
.with_compact(true)
.with_underlines(true)
.with_tab_width(4))
- .finish()
- .print(("stresstest.tao", Source::from(include_str!("stresstest.tao"))))
+ .finish(("stresstest.tao", Source::from(include_str!("stresstest.tao"))))
+ .print()
.unwrap();
}
diff --git a/src/lib.rs b/src/lib.rs
index 652b6a7..3d7c3a4 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -23,6 +23,7 @@ use std::{
cmp::{PartialEq, Eq},
fmt,
};
+use std::fmt::Formatter;
use unicode_width::UnicodeWidthChar;
/// A trait implemented by spans within a character-based source.
@@ -152,6 +153,7 @@ pub struct Report<'a, S: Span = Range> {
location: (::Owned, usize),
labels: Vec