parser: cargo fmt

This commit is contained in:
Simon Gardling 2025-12-03 19:54:16 -05:00
parent 2378f719a7
commit 9d96977785
Signed by: titaniumtown
GPG Key ID: 9AB28AC10ECE533D
7 changed files with 558 additions and 547 deletions

View File

@ -64,7 +64,8 @@ pub fn compile_hashmap(data: Vec<String>) -> Vec<(String, String)> {
/// Returns a vector of all possible splitting combinations of a strings /// Returns a vector of all possible splitting combinations of a strings
#[allow(dead_code)] #[allow(dead_code)]
fn all_possible_splits( fn all_possible_splits(
func: String, seen: &mut HashSet<(String, String)>, func: String,
seen: &mut HashSet<(String, String)>,
) -> Vec<(String, String)> { ) -> Vec<(String, String)> {
(1..func.len()) (1..func.len())
.map(|i| { .map(|i| {

View File

@ -60,7 +60,7 @@ impl FlatExWrapper {
.as_ref() .as_ref()
.map(|f| { .map(|f| {
f.clone() f.clone()
.partial_iter((0..=n).map(|_| 0)) .partial_iter((0..n).map(|_| 0))
.map(Self::new) .map(Self::new)
.unwrap_or(Self::EMPTY) .unwrap_or(Self::EMPTY)
}) })

View File

@ -54,9 +54,13 @@ impl BoolSlice {
} }
} }
const fn is_unmasked_variable(&self) -> bool { self.variable && !self.masked_var } const fn is_unmasked_variable(&self) -> bool {
self.variable && !self.masked_var
}
const fn is_unmasked_number(&self) -> bool { self.number && !self.masked_num } const fn is_unmasked_number(&self) -> bool {
self.number && !self.masked_num
}
const fn calculate_mask(&mut self, other: &BoolSlice) { const fn calculate_mask(&mut self, other: &BoolSlice) {
if other.masked_num && self.number { if other.masked_num && self.number {

View File

@ -87,15 +87,21 @@ impl<'a> std::fmt::Debug for Hint<'a> {
impl<'a> Hint<'a> { impl<'a> Hint<'a> {
#[inline] #[inline]
pub const fn is_none(&self) -> bool { matches!(&self, &Hint::None) } pub const fn is_none(&self) -> bool {
matches!(&self, &Hint::None)
}
#[inline] #[inline]
#[allow(dead_code)] #[allow(dead_code)]
pub const fn is_some(&self) -> bool { !self.is_none() } pub const fn is_some(&self) -> bool {
!self.is_none()
}
#[inline] #[inline]
#[allow(dead_code)] #[allow(dead_code)]
pub const fn is_single(&self) -> bool { matches!(&self, &Hint::Single(_)) } pub const fn is_single(&self) -> bool {
matches!(&self, &Hint::Single(_))
}
#[inline] #[inline]
#[allow(dead_code)] #[allow(dead_code)]