Skip to content

Commit

Permalink
Fix the datatype of log_msgs in the README and rustdoc
Browse files Browse the repository at this point in the history
The type was previously converted from String to A2LError, but the documentation remained unchanged.

Fixes #31
  • Loading branch information
DanielT committed Feb 5, 2024
1 parent 914e2fd commit 8a01b37
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ use a2lfile::*;

fn main() {
let input_filename = &std::ffi::OsString::from("example.a2l");
let mut logmsgs = Vec::<String>::new();
let mut logmsgs = Vec::<A2LError>::new();
let mut a2l_file = a2lfile::load(
input_filename,
None,
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ Load an a2l file
`a2ml_spec` is optional and contains a String that is valid A2ML that can be used while parsing the file in addition to the A2ML that might be contained inside the A2ML block in the file.
If a definition is provided here and there is also an A2ML block in the file, then the definition provided here will be tried first during parsing.
`log_msgs` is a reference to a `Vec<String>` which will receive all warning messages generated during parsing
`log_msgs` is a reference to a `Vec<A2LError>` which will receive all warnings generated during parsing
`strict_parsing` toggles strict parsing: If strict parsing is enabled, most warnings become errors.
Expand Down Expand Up @@ -148,7 +148,7 @@ load a2l data stored in a string
`a2ml_spec` is optional and contains a String that is valid A2ML that can be used while parsing the file in addition to the A2ML that might be contained inside the A2ML block in the file.
If a definition is provided here and there is also an A2ML block in the file, then the definition provided here will be tried first during parsing.
`log_msgs` is a reference to a `Vec<String>` which will receive all warning messages generated during parsing
`log_msgs` is a reference to a `Vec<A2LError>` which will receive all warnings generated during parsing
`strict_parsing` toggles strict parsing: If strict parsing is enabled, most warnings become errors.
Expand Down

0 comments on commit 8a01b37

Please sign in to comment.