Skip to content

Commit

Permalink
call language.format on TypeMap::export_to
Browse files Browse the repository at this point in the history
  • Loading branch information
Oscar Beaumont authored and Oscar Beaumont committed Dec 4, 2024
1 parent a7bbe7b commit 93bade7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion specta/src/type_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ impl TypeMap {
language: L,
path: impl AsRef<Path>,
) -> Result<(), L::Error> {
std::fs::write(path, self.export(language)?).map_err(Into::into)
let path = path.as_ref();
std::fs::write(&path, language.export(self)?)?;
language.format(path)?;
Ok(())
}

#[track_caller]
Expand Down

0 comments on commit 93bade7

Please sign in to comment.