aboutsummaryrefslogtreecommitdiff
path: root/mingling/src/parser/picker/bools.rs
diff options
context:
space:
mode:
authorWeicao-CatilGrass <1992414357@qq.com>2026-05-31 02:42:52 +0800
committer魏曹先生 <1992414357@qq.com>2026-05-31 17:19:20 +0800
commit2aa7bda3cb21ce6c052b82e08bcab79a625d04f2 (patch)
treef10b89007fc67ca1a948f34abe6869b49296b932 /mingling/src/parser/picker/bools.rs
parent3aa409a55e4f2f0ab41b0949cc06eb13c2da4a43 (diff)
Enhance code quality across the entire codebase
Diffstat (limited to 'mingling/src/parser/picker/bools.rs')
-rw-r--r--mingling/src/parser/picker/bools.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/mingling/src/parser/picker/bools.rs b/mingling/src/parser/picker/bools.rs
index aa2335a..ede8812 100644
--- a/mingling/src/parser/picker/bools.rs
+++ b/mingling/src/parser/picker/bools.rs
@@ -37,10 +37,12 @@ impl std::ops::Deref for Yes {
}
impl Yes {
+ #[must_use]
pub fn is_yes(&self) -> bool {
matches!(self, Yes::Yes)
}
+ #[must_use]
pub fn is_no(&self) -> bool {
matches!(self, Yes::No)
}
@@ -92,10 +94,12 @@ impl std::ops::Deref for True {
}
impl True {
+ #[must_use]
pub fn is_true(&self) -> bool {
matches!(self, True::True)
}
+ #[must_use]
pub fn is_false(&self) -> bool {
matches!(self, True::False)
}