fix(def): conditional compilation and doc fixes
@@ -109,7 +109,7 @@ impl<'e> Definitions<'e> {
/// Output all definitions merged into a single file.
///
- /// The directory must exist but the file will be created or overwritten as needed.
+ /// The parent directory must exist but the file will be created or overwritten as needed.
#[cfg(all(not(feature = "no_std"), not(target_family = "wasm")))]
pub fn write_to_file(&self, path: impl AsRef<std::path::Path>) -> std::io::Result<()> {
std::fs::write(path, self.single_file())
@@ -131,6 +131,8 @@ impl<'e> Definitions<'e> {
def_file += &self.static_module_impl(&config);
def_file += "\n";
+ #[cfg(not(feature = "no_module"))]
+ {
for (module_name, module_def) in self.modules_impl(&config) {
write!(
&mut def_file,
@@ -139,6 +141,7 @@ impl<'e> Definitions<'e> {
.unwrap();
}
def_file += "\n";
+ }
def_file += &self.scope_impl(&config);
