use std::error::Error; #[cfg(feature = "docsrs")] use vergen::EmitBuilder; fn main() -> Result<(), Box> { emit_git_metadata()?; Ok(()) } #[cfg(feature = "docsrs")] fn emit_git_metadata() -> Result<(), Box> { // Emit the instructions EmitBuilder::builder().all_git().emit()?; Ok(()) } #[cfg(not(feature = "docsrs"))] fn emit_git_metadata() -> Result<(), Box> { Ok(()) }