diff --git a/server/src/infra/graphql/api.rs b/server/src/infra/graphql/api.rs index 629153b..b228993 100644 --- a/server/src/infra/graphql/api.rs +++ b/server/src/infra/graphql/api.rs @@ -43,7 +43,7 @@ pub fn export_schema(opts: ExportGraphQLSchemaOpts) -> anyhow::Result<()> { use std::path::Path; let path = Path::new(&path); let mut file = - File::create(&path).context(format!("unable to open '{}'", path.display()))?; + File::create(path).context(format!("unable to open '{}'", path.display()))?; file.write_all(output.as_bytes()) .context(format!("unable to write in '{}'", path.display()))?; } diff --git a/server/src/main.rs b/server/src/main.rs index 63bcf78..9e133f4 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -170,7 +170,7 @@ fn run_healthcheck(opts: RunOpts) -> Result<()> { failure = true; error!("{:#}", e) }); - std::process::exit(if failure { 1 } else { 0 }) + std::process::exit(i32::from(failure)) } fn main() -> Result<()> {