async fn process_judging_section(
        &mut self,
        node_judging: roxmltree::Node<'_, '_>,
    ) -> anyhow::Result<()> {
        let node_testset = node_judging
            .first_element_child()
            .context("<judging> element does not have a <testset> child")?;
        assert_eq!(node_testset.tag_name().name(), "testset");

        let mut test_pattern = None;
        let mut ans_pattern = None;
        for child in node_testset.children() {
            if !child.is_element() {
                continue;
            }
            match child.tag_name().name() {
                "time-limit" => {
                    let tl = child
                        .text()
                        .context("<time-limit> does not contain value")?
                        .parse::<u64>()
                        .context("parsing <time-limit> failed")?;
                    self.tx
                        .send_event(Update::Property {
                            property_name: PropertyName::TimeLimit,
                            property_value: tl.to_string(),
                        })
                        .await?;
                    self.limits.time.replace(tl);
                }
                "memory-limit" => {
                    let ml = child
                        .text()
                        .context("<memory-limiy> does not contain value")?
                        .parse::<u64>()
                        .context("parsing <memory-limit> failed")?;
                    self.tx
                        .send_event(Update::Property {
                            property_name: PropertyName::MemoryLimit,
                            property_value: ml.to_string(),
                        })
                        .await?;
                    self.limits.memory.replace(ml);
                }
                "input-path-pattern" => {
                    let pat = child.text().unwrap().to_string();
                    self.tx
                        .send_event(Update::Property {
                            property_name: PropertyName::InputPathPattern,
                            property_value: pat.clone(),
                        })
                        .await?;
                    test_pattern.replace(pat);
                }
                "answer-path-pattern" => {
                    let pat = child.text().unwrap().to_string();
                    self.tx
                        .send_event(Update::Property {
                            property_name: PropertyName::OutputPathPattern,
                            property_value: pat.clone(),
                        })
                        .await?;
                    ans_pattern.replace(pat);
                }
                "test-count" => {}
                "tests" => {
                    self.process_tests(child).await?;
                }
                _ => {
                    let message = format!(
                        "unexpected tag in <problem><judging><testset>: {}",
                        child.tag_name().name()
                    );
                    self.tx.send_event(Update::Warning(message)).await?;
                }
            }
        }
        Ok(())
    }
// <problem><judging> is most important section for us: it contains information
// about tests
 is most important section for us: it contains information
about tests
is most important section for us : it contains information about tests
async fn process_judging_section(
        &mut self,
        node_judging: roxmltree::Node<'_, '_>,
    ) -> anyhow::Result<()> {
        let node_testset = node_judging
            .first_element_child()
            .context("<judging> element does not have a <testset> child")?;
        assert_eq!(node_testset.tag_name().name(), "testset");
        let mut test_pattern = None;
        let mut ans_pattern = None;
        for child in node_testset.children() {
            if !child.is_element() {
                continue;
            }
            match child.tag_name().name() {
                "time-limit" => {
                    let tl = child
                        .text()
                        .context("<time-limit> does not contain value")?
                        .parse::<u64>()
                        .context("parsing <time-limit> failed")?;
                    self.tx
                        .send_event(Update::Property {
                            property_name: PropertyName::TimeLimit,
                            property_value: tl.to_string(),
                        })
                        .await?;
                    self.limits.time.replace(tl);
                }
                "memory-limit" => {
                    let ml = child
                        .text()
                        .context("<memory-limiy> does not contain value")?
                        .parse::<u64>()
                        .context("parsing <memory-limit> failed")?;
                    self.tx
                        .send_event(Update::Property {
                            property_name: PropertyName::MemoryLimit,
                            property_value: ml.to_string(),
                        })
                        .await?;
                    self.limits.memory.replace(ml);
                }
                "input-path-pattern" => {
                    let pat = child.text().unwrap().to_string();
                    self.tx
                        .send_event(Update::Property {
                            property_name: PropertyName::InputPathPattern,
                            property_value: pat.clone(),
                        })
                        .await?;
                    test_pattern.replace(pat);
                }
                "answer-path-pattern" => {
                    let pat = child.text().unwrap().to_string();
                    self.tx
                        .send_event(Update::Property {
                            property_name: PropertyName::OutputPathPattern,
                            property_value: pat.clone(),
                        })
                        .await?;
                    ans_pattern.replace(pat);
                }
                "test-count" => {}
                "tests" => {
                    self.process_tests(child).await?;
                }
                _ => {
                    let message = format!(
                        "unexpected tag in <problem><judging><testset>: {}",
                        child.tag_name().name()
                    );
                    self.tx.send_event(Update::Warning(message)).await?;
                }
            }
        }
        Ok(())
    }
async fn process_judging_section ( & mut self , node_judging : roxmltree :: Node < ' _ , ' _ > , ) -> anyhow :: Result < ( ) > { let node_testset = node_judging . first_element_child ( ) . context ( " " ) ? ; assert_eq ! ( node_testset tag_name ( ) name ( ) " " ) ; let mut test_pattern = None ; let mut ans_pattern = None ; for child in node_testset . children ( ) { if ! child . is_element ( ) { continue ; } match child . tag_name ( ) . name ( ) { " " => { let tl = child . text ( ) . context ( " " ) ? . parse :: < u64 > ( ) . context ( " " ) ? ; self . tx . send_event ( Update :: Property { property_name : PropertyName :: TimeLimit , property_value : tl . to_string ( ) , } ) . await ? ; self . limits . time . replace ( tl ) ; } " " => { let ml = child . text ( ) . context ( " " ) ? . parse :: < u64 > ( ) . context ( " " ) ? ; self . tx . send_event ( Update :: Property { property_name : PropertyName :: MemoryLimit , property_value : ml . to_string ( ) , } ) . await ? ; self . limits . memory . replace ( ml ) ; } " " => { let pat = child . text ( ) . unwrap ( ) . to_string ( ) ; self . tx . send_event ( Update :: Property { property_name : PropertyName :: InputPathPattern , property_value : pat . clone ( ) , } ) . await ? ; test_pattern . replace ( pat ) ; } " " => { let pat = child . text ( ) . unwrap ( ) . to_string ( ) ; self . tx . send_event ( Update :: Property { property_name : PropertyName :: OutputPathPattern , property_value : pat . clone ( ) , } ) . await ? ; ans_pattern . replace ( pat ) ; } " " => { } " " => { self . process_tests ( child ) . await ? ; } _ => { let message = format ! ( " " child tag_name ( ) name ( ) ) ; self . tx . send_event ( Update :: Warning ( message ) ) . await ? ; } } } Ok ( ( ) ) }
<problem><judging> is most important section for us: it contains information
about tests
<problem > <judging > is most important section for us : it contains information about tests
&mut self
node_judging
roxmltree::Node<'_, '_>