|
|
|
@ -36,13 +36,13 @@ pub fn read_turtle<'a, R: Read + 'a>( |
|
|
|
|
cur_subject: Vec::default(), |
|
|
|
|
cur_predicate: Vec::default(), |
|
|
|
|
}; |
|
|
|
|
let mut string_buffer = String::default(); |
|
|
|
|
let mut triple_buffer = Vec::default(); |
|
|
|
|
match BufReader::new(source).read_to_string(&mut string_buffer) { |
|
|
|
|
Ok(_) => match grammar::turtleDoc(&string_buffer, &mut state, &mut triple_buffer) { |
|
|
|
|
|
|
|
|
|
let mut string_buffer = String::default(); |
|
|
|
|
BufReader::new(source).read_to_string(&mut string_buffer)?; |
|
|
|
|
|
|
|
|
|
match grammar::turtleDoc(&string_buffer, &mut state, &mut triple_buffer) { |
|
|
|
|
Ok(_) => Ok(triple_buffer.into_iter()), |
|
|
|
|
Err(error) => Err(RioError::new(error)), |
|
|
|
|
}, |
|
|
|
|
Err(error) => Err(RioError::new(error)), |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|