fn lint_advisory(&mut self, advisory: &toml::Value) {
        if let Some(table) = advisory.as_table() {
            for (key, value) in table {
                match key.as_str() {
                    "advisory" => self.lint_metadata(value),
                    "versions" => self.lint_versions(value),
                    "affected" => self.lint_affected(value),
                    _ => self.errors.push(Error {
                        kind: ErrorKind::key(key),
                        section: None,
                        message: None,
                    }),
                }
            }
        } else {
            self.errors.push(Error {
                kind: ErrorKind::Malformed,
                section: None,
                message: Some("expected table"),
            });
        }
    }
/// Lint the provided TOML value as the toplevel table of an advisory
Lint the provided TOML value as the toplevel table of an advisory
Lint the provided TOML value as the toplevel table of an advisory
fn lint_advisory(&mut self, advisory: &toml::Value) {
        if let Some(table) = advisory.as_table() {
            for (key, value) in table {
                match key.as_str() {
                    "advisory" => self.lint_metadata(value),
                    "versions" => self.lint_versions(value),
                    "affected" => self.lint_affected(value),
                    _ => self.errors.push(Error {
                        kind: ErrorKind::key(key),
                        section: None,
                        message: None,
                    }),
                }
            }
        } else {
            self.errors.push(Error {
                kind: ErrorKind::Malformed,
                section: None,
                message: Some("expected table"),
            });
        }
    }
fn lint_advisory ( & mut self , advisory : & toml :: Value ) { if let Some ( table ) = advisory . as_table ( ) { for ( key , value ) in table { match key . as_str ( ) { " " => self . lint_metadata ( value ) , " " => self . lint_versions ( value ) , " " => self . lint_affected ( value ) , _ => self . errors . push ( Error { kind : ErrorKind :: key ( key ) , section : None , message : None , } ) , } } } else { self . errors . push ( Error { kind : ErrorKind :: Malformed , section : None , message : Some ( " " ) , } ) ; } }
Lint the provided TOML value as the toplevel table of an advisory
Lint the provided TOML value as the toplevel table of an advisory
&mut self
advisory
&toml::Value
&mut self
advisory
&toml::Value