From 5d263d4ef259d31917afd26208897d08527f791d Mon Sep 17 00:00:00 2001 From: Ary Borenszweig Date: Mon, 6 Jan 2025 11:19:48 -0300 Subject: [PATCH] Clippy --- tooling/nargo_cli/src/cli/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tooling/nargo_cli/src/cli/mod.rs b/tooling/nargo_cli/src/cli/mod.rs index f5ee18643c..8c72fde893 100644 --- a/tooling/nargo_cli/src/cli/mod.rs +++ b/tooling/nargo_cli/src/cli/mod.rs @@ -164,7 +164,9 @@ pub(crate) fn start_cli() -> eyre::Result<()> { NargoCommand::GenerateCompletionScript(args) => generate_completion_script_cmd::run(args), }?; - lock_file.map(|lock| lock.unlock().expect("Failed to unlock Nargo.toml")); + if let Some(lock_file) = lock_file { + lock_file.unlock().expect("Failed to unlock Nargo.toml"); + } Ok(()) }