Skip to content

refactor: drop redundant condition - #40

Open
salim-b wants to merge 1 commit into
chevdor:masterfrom
salim-b:patch-1
Open

salim-b wants to merge 1 commit into
chevdor:masterfrom
salim-b:patch-1

Conversation

@salim-b

@salim-b salim-b commented Sep 13, 2026

Copy link
Copy Markdown

#[cfg(feature = "fluent")] already excludes the whole if block from compilation entirely when the fluent feature is off, so the block that remains after conditional compilation can only exist when fluent is enabled. In that case cfg!(feature = "fluent") inside it will always evaluate to true, making the if cfg!(feature = "fluent") check redundant: it can never be false at the point it's evaluated.

`#[cfg(feature = "fluent")]` already excludes the whole `if` block from compilation entirely when the `fluent` feature is off, so the block that remains after conditional compilation can only exist when `fluent` is enabled. In that case `cfg!(feature = "fluent")` inside it will always evaluate to `true`, making the `if cfg!(feature = "fluent")` check redundant: it can never be `false` at the point it's evaluated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant