zulip-api 0.0.2

Client library for interacting with the Zulip API
use std::io::Write;

fn main() {
    println!("cargo::rerun-if-changed=Cargo.toml");

    let version = env!("CARGO_PKG_VERSION");

    std::fs::File::create("src/version.rs")
        .and_then(|mut file| {
            file.write_all(
                format!(
                    r#"//! Crate version helper.

/// Gets the crate's version.
pub const fn version() -> &'static str {{
    "{version}"
}}
"#
                )
                .as_bytes(),
            )
        })
        .expect("Error write src/version.rs to disk");
}