aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar cel 🌸 <cel@bunny.garden>2024-11-02 02:59:40 +0000
committerLibravatar cel 🌸 <cel@bunny.garden>2024-11-02 02:59:40 +0000
commit622634b3a56c897b600893dc2e2b0a57f90471d3 (patch)
tree41e70f7638c844231843950848e5f54e478a804c /src
parentba1cadbfb5d8eeb7535a3d22b3dbfb848512f986 (diff)
downloadpeanuts-622634b3a56c897b600893dc2e2b0a57f90471d3.tar.gz
peanuts-622634b3a56c897b600893dc2e2b0a57f90471d3.tar.bz2
peanuts-622634b3a56c897b600893dc2e2b0a57f90471d3.zip
test composers
Diffstat (limited to 'src')
-rw-r--r--src/main.rs13
1 files changed, 9 insertions, 4 deletions
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();
}