@@ -43,9 +43,9 @@ pub fn parse_ntriples(reader: impl BufRead) -> NTriplesParser<impl BufRead> {
4343}
4444
4545// Parse yaml configuration file.
46- pub fn parse_config ( path : & Path ) -> Rules {
46+ pub fn parse_rules ( path : & Path ) -> Rules {
4747 return match File :: open ( path) {
48- Ok ( file) => serde_yml:: from_reader ( file) . expect ( "Error parsing config file." ) ,
48+ Ok ( file) => serde_yml:: from_reader ( file) . expect ( "Error parsing rules file." ) ,
4949 Err ( e) => panic ! ( "Cannot open file '{:?}': '{}'." , path, e) ,
5050 } ;
5151}
@@ -62,7 +62,7 @@ pub fn read_bytes(path: &PathBuf) -> Vec<u8> {
6262
6363#[ cfg( test) ]
6464mod tests {
65- use super :: { parse_config , parse_ntriples } ;
65+ use super :: { parse_ntriples , parse_rules } ;
6666 use rio_api:: parser:: TriplesParser ;
6767 use std:: {
6868 io:: { BufRead , BufReader } ,
@@ -86,8 +86,8 @@ mod tests {
8686 }
8787 // Test the parsing of a config file.
8888 #[ test]
89- fn config_parsing ( ) {
90- let config_path = Path :: new ( "tests/data/config .yaml" ) ;
91- parse_config ( & config_path) ;
89+ fn rules_parsing ( ) {
90+ let config_path = Path :: new ( "tests/data/rules .yaml" ) ;
91+ parse_rules ( & config_path) ;
9292 }
9393}
0 commit comments