Closed adeschamps closed 5 years ago
Thanks for reporting! I made some changes to make this crate into a procedural macro instead with #22 which also removes the rustfmt dependency (regenerating the internal schema is done on demand when developing).
Building schemafy without rustfmt installed results in an error:
If it's okay to have the build succeed even if rustfmt fails, then I think that all that needs to be done is remove the
?
from the following, and possibly replace it withlet _ = format(command, &output)
in order to silence the warning from an unusedResult
.https://github.com/Marwes/schemafy/blob/1d0ae918a0e781e82a5d7768f63a05880228534f/src/lib.rs#L623-L626
Alternatively, we could try to detect whether
rustfmt
is installed inbuild.rs
and then only run it if it's present. Whichever you'd prefer, I'm happy to open a PR.