From d346fe1d34f255e5d2ad217cc42b24c3aabc7c2a Mon Sep 17 00:00:00 2001 From: daimond113 <72147841+daimond113@users.noreply.github.com> Date: Sun, 20 Oct 2024 18:15:14 +0200 Subject: [PATCH] refactor: optimize boolean expression in publish command --- CHANGELOG.md | 3 +++ src/cli/commands/publish.rs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ded06bd..d42ba9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Performance - Clone dependency repos shallowly by @daimond113 +### Changed +- Optimize boolean expression in `publish` command by @daimond113 + ## [0.5.0-rc.6] - 2024-10-14 ### Added - Support full version requirements in workspace version field by @daimond113 diff --git a/src/cli/commands/publish.rs b/src/cli/commands/publish.rs index 9151f0b..d3b7c24 100644 --- a/src/cli/commands/publish.rs +++ b/src/cli/commands/publish.rs @@ -64,7 +64,7 @@ impl PublishCommand { manifest.target, Target::Roblox { .. } | Target::RobloxServer { .. } ) { - if !manifest.target.build_files().is_some_and(|f| !f.is_empty()) { + if manifest.target.build_files().is_none_or(|f| f.is_empty()) { anyhow::bail!("no build files found in target"); }