From d01da83866e4032fdb453a2caee4386f8b41338c Mon Sep 17 00:00:00 2001 From: Mark <> Date: Wed, 26 Jun 2024 21:21:44 +0200 Subject: [PATCH] remove O: Write constraint on pretty_print_to --- mers_lib/Cargo.toml | 2 +- mers_lib/src/pretty_print.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mers_lib/Cargo.toml b/mers_lib/Cargo.toml index 78718d7..dfe44dc 100755 --- a/mers_lib/Cargo.toml +++ b/mers_lib/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mers_lib" -version = "0.8.23" +version = "0.8.24" edition = "2021" license = "MIT OR Apache-2.0" description = "library to use the mers language in other projects" diff --git a/mers_lib/src/pretty_print.rs b/mers_lib/src/pretty_print.rs index f2973cd..50e62ed 100644 --- a/mers_lib/src/pretty_print.rs +++ b/mers_lib/src/pretty_print.rs @@ -1,4 +1,4 @@ -use std::{io::Write, sync::Arc}; +use std::sync::Arc; use crate::{ errors::CheckError, @@ -12,10 +12,11 @@ pub fn pretty_print(src: Source) { eprintln!("{e:?}"); std::process::exit(28); } + println!(); } /// to print to stdout, use `pretty_print` (available only with the `ecolor-term` feature) -pub fn pretty_print_to( +pub fn pretty_print_to( mut src: Source, out: &mut O, theme: impl FTheme, @@ -140,7 +141,7 @@ impl ThemeGen for HtmlDefaultTheme { pub trait FTheme: ThemeGen {} impl> FTheme for T {} -fn print_parsed( +fn print_parsed( srca: &Arc, parsed: &dyn crate::program::parsed::MersStatement, out: &mut O, @@ -158,7 +159,6 @@ fn print_parsed( theme.color(&src[i..end], clr, out); i = end; } - let _ = writeln!(out); } fn build_print( sections: &mut Vec<(FColor, usize)>,