From a3216a45500faa35d08d62bec2ca355238fbebf2 Mon Sep 17 00:00:00 2001 From: Waldemar Heinze <1307809+wheinze@users.noreply.github.com> Date: Thu, 24 Nov 2022 23:52:57 +0100 Subject: [PATCH] server: fix clippy's suggestions --- server/src/infra/graphql/api.rs | 2 +- server/src/main.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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<()> {