diff --git a/tavern/Cargo.toml b/tavern/Cargo.toml index e2418a9..51e6883 100644 --- a/tavern/Cargo.toml +++ b/tavern/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tavern" -version = "0.2.5" +version = "0.2.6" edition = "2024" description = "A blogging system that will allow you to write your blog in Markdown and then display it in HTML using Dioxus." repository = "/CyberMages/tavern" @@ -18,7 +18,7 @@ sqlx = { version = "0.8.6", features = ["sqlite", "chrono", "runtime-tokio"], op toml = "0.9.5" [dev-dependencies] -tokio = { version = "1", features = ["full"] } +tokio = { version = "1", features = ["rt-multi-thread", "macros"] } diff --git a/tavern/examples/generate_database.rs b/tavern/examples/generate_database.rs index 8a451e0..f96eb99 100644 --- a/tavern/examples/generate_database.rs +++ b/tavern/examples/generate_database.rs @@ -1,13 +1,16 @@ -#![cfg(feature = "publisher")] - +#[cfg(feature = "publisher")] use chrono::NaiveDate; +#[cfg(feature = "publisher")] use tavern::{Adventurer, Legend, Lore, Story, Tale, Tavern}; + +#[cfg(feature = "publisher")] use tavern::Database; /// This will generate a tavern that we can create a Toml file from. +#[cfg(feature = "publisher")] fn generate_tavern() -> Tavern { let legend: Legend = Legend @@ -73,6 +76,7 @@ fn generate_tavern() -> Tavern } +#[cfg(feature = "publisher")] fn create_temp_file
(filename: P) -> std::path::PathBuf
where P: AsRef (filename: P) -> std::path::PathBuf
path
}
+#[cfg(feature = "publisher")]
fn cleanup_temp_file (path: P)
where P: AsRef (path: P)
}
}
+#[cfg(feature = "publisher")]
fn write_to_file (tavern: Tavern, config_file: P) -> Result<(), Box (tavern: Tavern, config_file: P) -> Result<(), Box (config_file: P) -> Tavern
}
+#[cfg(feature = "publisher")]
async fn create_database() -> Result<(), Box