mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Be more specific with clippy's exhaustive_enums lint exceptions
This commit is contained in:
@@ -22,6 +22,7 @@ pub use error::{ConditionEvaluationError, MetadataRetrievalError};
|
||||
|
||||
/// Control behaviour when writing to files.
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
||||
#[non_exhaustive]
|
||||
pub enum WriteMode {
|
||||
/// Create the file if it does not exist, otherwise error.
|
||||
Create,
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
// Allow some lints that are denied at the workspace level.
|
||||
#![allow(
|
||||
clippy::doc_markdown,
|
||||
clippy::exhaustive_enums,
|
||||
clippy::filetype_is_file,
|
||||
clippy::must_use_candidate,
|
||||
clippy::missing_errors_doc,
|
||||
|
||||
@@ -39,6 +39,10 @@ pub fn set_log_level(level: LogLevel) {
|
||||
|
||||
/// Codes used to specify different levels of API logging.
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
||||
#[expect(
|
||||
clippy::exhaustive_enums,
|
||||
reason = "Adding a new log level should be a breaking change."
|
||||
)]
|
||||
pub enum LogLevel {
|
||||
Trace,
|
||||
Debug,
|
||||
|
||||
@@ -15,6 +15,10 @@ use super::{
|
||||
|
||||
/// Codes used to indicate the type of a message.
|
||||
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
||||
#[expect(
|
||||
clippy::exhaustive_enums,
|
||||
reason = "Adding a new message is a breaking change."
|
||||
)]
|
||||
pub enum MessageType {
|
||||
/// A notification message that is of no significant severity.
|
||||
#[default]
|
||||
|
||||
@@ -10,6 +10,7 @@ use super::{
|
||||
|
||||
/// Represents whether a Bash Tag suggestion is for addition or removal.
|
||||
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
||||
#[expect(clippy::exhaustive_enums, reason = "It's effectively a boolean")]
|
||||
pub enum TagSuggestion {
|
||||
#[default]
|
||||
Addition,
|
||||
|
||||
Reference in New Issue
Block a user