(&self)
| 741 | |
| 742 | impl<S> CFormatStrOrBytes<S> { |
| 743 | pub fn check_specifiers(&self) -> Option<(usize, bool)> { |
| 744 | let mut count = 0; |
| 745 | let mut mapping_required = false; |
| 746 | for (_, part) in &self.parts { |
| 747 | if part.is_specifier() { |
| 748 | let has_key = part.has_key(); |
| 749 | if count == 0 { |
| 750 | mapping_required = has_key; |
| 751 | } else if mapping_required != has_key { |
| 752 | return None; |
| 753 | } |
| 754 | count += 1; |
| 755 | } |
| 756 | } |
| 757 | Some((count, mapping_required)) |
| 758 | } |
| 759 | |
| 760 | #[inline] |
| 761 | pub fn iter(&self) -> impl Iterator<Item = &(usize, CFormatPart<S>)> { |
no test coverage detected