1#![doc = include_str!("../README.md")]
2#![warn(
3 missing_docs,
4 warnings,
5 deprecated_safe,
6 future_incompatible,
7 keyword_idents,
8 let_underscore,
9 nonstandard_style,
10 refining_impl_trait,
11 rust_2018_compatibility,
12 rust_2018_idioms,
13 rust_2021_compatibility,
14 rust_2024_compatibility,
15 unused,
16 clippy::all,
17 clippy::pedantic,
18 clippy::style,
19 clippy::perf,
20 clippy::complexity,
21 clippy::correctness,
22 clippy::restriction,
23 clippy::nursery,
24 clippy::cargo
25)]
26#![expect(
27 clippy::implicit_return,
28 clippy::question_mark_used,
29 clippy::else_if_without_else,
30 clippy::module_name_repetitions,
31 reason = "bad lint"
32)]
33#![expect(
34 clippy::single_call_fn,
35 clippy::mod_module_files,
36 clippy::pub_with_shorthand,
37 clippy::pattern_type_mismatch,
38 reason = "style"
39)]
40#![expect(
41 clippy::while_let_on_iterator,
42 reason = "better to understand when the iterator is used after the loop breaks"
43)]
44#![allow(clippy::missing_inline_in_public_items, reason = "bad lint")]
45#![expect(clippy::doc_include_without_cfg, reason = "see issue #13918")]
46#![expect(clippy::blanket_clippy_restriction_lints, reason = "I want them all")]
47#![expect(clippy::multiple_inherent_impl, reason = "useful when lots of methods")]
48
49mod errors;
53mod filter;
54mod parse;
55pub mod prelude;
56mod types;
57
58const fn unwrap_or(opt: Option<bool>, default: bool) -> bool {
60 match opt {
61 Some(val) => val,
62 None => default,
63 }
64}