feat: add pretty print

This commit is contained in:
2021-08-08 11:14:32 +08:00
parent c20df9c739
commit 4a873ab1f6
5 changed files with 884 additions and 3 deletions

View File

@@ -0,0 +1,12 @@
use prettyprint::{PrettyPrintError, PrettyPrinter};
fn main() -> Result<(), PrettyPrintError> {
let theme = include_bytes!("../assets/themes.bin");
let print = PrettyPrinter::default()
.language("rust")
.load_theme(theme.to_vec())
.build()?;
print.string(include_str!("main.rs"))
}