From 622634b3a56c897b600893dc2e2b0a57f90471d3 Mon Sep 17 00:00:00 2001
From: cel 🌸 <cel@bunny.garden>
Date: Sat, 2 Nov 2024 02:59:40 +0000
Subject: test composers

---
 src/main.rs | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

(limited to 'src')

diff --git a/src/main.rs b/src/main.rs
index ef69011..ea86e07 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,8 +1,10 @@
+use peanuts::xml::composers::Composer;
 use peanuts::xml::parsers::Parser;
 use peanuts::xml::Document;
 
-fn main() {
-    let document = Document::parse(
+#[tokio::main]
+async fn main() {
+    let (rest, document) = Document::parse(
         "<?xml version=\"1.0\"?>
 <TEST>
   <block1>Background Mark 1</block1>
@@ -10,6 +12,9 @@ fn main() {
   <block3>Background Mark 3</block3>
 </TEST>ahsdkjlfhasdlkjfhkljh
 ",
-    );
-    println!("{:#?}", document);
+    )
+    .unwrap();
+    println!("{:#?}{}", document, rest);
+    let mut stdout = tokio::io::stdout();
+    document.write(&mut stdout).await.unwrap();
 }
-- 
cgit