server: fix clippy's suggestions

This commit is contained in:
Waldemar Heinze 2022-11-24 23:52:57 +01:00 committed by GitHub
parent 2668ea4553
commit a3216a4550
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -43,7 +43,7 @@ pub fn export_schema(opts: ExportGraphQLSchemaOpts) -> anyhow::Result<()> {
use std::path::Path; use std::path::Path;
let path = Path::new(&path); let path = Path::new(&path);
let mut file = 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()) file.write_all(output.as_bytes())
.context(format!("unable to write in '{}'", path.display()))?; .context(format!("unable to write in '{}'", path.display()))?;
} }

View File

@ -170,7 +170,7 @@ fn run_healthcheck(opts: RunOpts) -> Result<()> {
failure = true; failure = true;
error!("{:#}", e) error!("{:#}", e)
}); });
std::process::exit(if failure { 1 } else { 0 }) std::process::exit(i32::from(failure))
} }
fn main() -> Result<()> { fn main() -> Result<()> {