diff --git a/src/main.rs b/src/main.rs index 3b256c0..14ee301 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,6 +20,15 @@ mod tag_omission; #[tokio::main] async fn main() -> io::Result<()> { + // This gives slightly prettier error-printing. + if let Err(e) = run().await { + eprintln!("{}", e); + std::process::exit(1); + } + Ok(()) +} + +async fn run() -> io::Result<()> { // Since we're using Rc in the DOM implementation, we must ensure that tasks // which act on it are confined to this thread.