From 037dd58453e2d7bc59dd3b1b187af0f40b886754 Mon Sep 17 00:00:00 2001 From: Roman Valls Guimera Date: Mon, 8 Feb 2021 21:50:27 +1100 Subject: [PATCH] Restructured as @MarcAntoine-Arnaud suggested: examples workspace, more amenable to CI and examples are easier to find than in https://github.com/media-io/yaserde_examples --- Cargo.toml | 1 + examples/Cargo.toml | 12 ++++++++++++ examples/{ => src}/bbigras_namespace.rs | 0 examples/{ => src}/boscop.rs | 0 examples/{ => src}/lib.rs | 1 - examples/{ => src}/ln_dom.rs | 0 examples/{ => src}/svd/Cargo.toml | 0 examples/{ => src}/svd/main.rs | 0 {tests => examples/tests}/data/bbigras-namespace.xml | 0 {tests => examples/tests}/data/boscop.xml | 0 {tests => examples/tests}/data/ln-dom.xml | 0 11 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 examples/Cargo.toml rename examples/{ => src}/bbigras_namespace.rs (100%) rename examples/{ => src}/boscop.rs (100%) rename examples/{ => src}/lib.rs (93%) rename examples/{ => src}/ln_dom.rs (100%) rename examples/{ => src}/svd/Cargo.toml (100%) rename examples/{ => src}/svd/main.rs (100%) rename {tests => examples/tests}/data/bbigras-namespace.xml (100%) rename {tests => examples/tests}/data/boscop.xml (100%) rename {tests => examples/tests}/data/ln-dom.xml (100%) diff --git a/Cargo.toml b/Cargo.toml index fe4f64d..801550b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,4 +2,5 @@ members = [ "yaserde", "yaserde_derive", + "examples" ] diff --git a/examples/Cargo.toml b/examples/Cargo.toml new file mode 100644 index 0000000..8b797c3 --- /dev/null +++ b/examples/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "yaserde-examples" +version = "0.0.1" +authors = ["Marc-Antoine Arnaud "] +license = "MIT" + +[dependencies] +yaserde_derive = { version = "0.3.7" } +yaserde = { version = "0.3.7" } +xml-rs = "0.8.0" +log = "0.4" +simple_logger = "1.0" diff --git a/examples/bbigras_namespace.rs b/examples/src/bbigras_namespace.rs similarity index 100% rename from examples/bbigras_namespace.rs rename to examples/src/bbigras_namespace.rs diff --git a/examples/boscop.rs b/examples/src/boscop.rs similarity index 100% rename from examples/boscop.rs rename to examples/src/boscop.rs diff --git a/examples/lib.rs b/examples/src/lib.rs similarity index 93% rename from examples/lib.rs rename to examples/src/lib.rs index ae21c69..1943c57 100644 --- a/examples/lib.rs +++ b/examples/src/lib.rs @@ -1,4 +1,3 @@ -#[macro_use] extern crate log; extern crate simple_logger; extern crate xml; diff --git a/examples/ln_dom.rs b/examples/src/ln_dom.rs similarity index 100% rename from examples/ln_dom.rs rename to examples/src/ln_dom.rs diff --git a/examples/svd/Cargo.toml b/examples/src/svd/Cargo.toml similarity index 100% rename from examples/svd/Cargo.toml rename to examples/src/svd/Cargo.toml diff --git a/examples/svd/main.rs b/examples/src/svd/main.rs similarity index 100% rename from examples/svd/main.rs rename to examples/src/svd/main.rs diff --git a/tests/data/bbigras-namespace.xml b/examples/tests/data/bbigras-namespace.xml similarity index 100% rename from tests/data/bbigras-namespace.xml rename to examples/tests/data/bbigras-namespace.xml diff --git a/tests/data/boscop.xml b/examples/tests/data/boscop.xml similarity index 100% rename from tests/data/boscop.xml rename to examples/tests/data/boscop.xml diff --git a/tests/data/ln-dom.xml b/examples/tests/data/ln-dom.xml similarity index 100% rename from tests/data/ln-dom.xml rename to examples/tests/data/ln-dom.xml