MCPcopy Index your code
hub / github.com/RustPython/RustPython / parse_spec_mapping_key

Function parse_spec_mapping_key

crates/common/src/cformat.rs:564–576  ·  view source on GitHub ↗
(iter: &mut ParseIter<I>)

Source from the content-addressed store, hash-verified

562}
563
564fn parse_spec_mapping_key<T, I>(iter: &mut ParseIter<I>) -> Result<Option<T>, ParsingError>
565where
566 T: FormatBuf,
567 I: Iterator<Item = T::Char>,
568{
569 if let Some((index, _)) = iter.next_if(|(_, c)| c.eq_char('(')) {
570 return match parse_text_inside_parentheses(iter) {
571 Some(key) => Ok(Some(key)),
572 None => Err((CFormatErrorType::UnmatchedKeyParentheses, index)),
573 };
574 }
575 Ok(None)
576}
577
578fn parse_flags<C, I>(iter: &mut ParseIter<I>) -> CConversionFlags
579where

Callers 1

parseMethod · 0.85

Calls 4

eq_charMethod · 0.80
SomeClass · 0.50
ErrClass · 0.50

Tested by

no test coverage detected