Improved naming of Header constructor
`from_record` is now called `with_record` as the library standard suggests
This commit is contained in:
@@ -410,7 +410,7 @@ impl Header {
|
||||
///
|
||||
/// Initializes the signal_specs vector with the correct capacity provided
|
||||
/// by the record.
|
||||
fn from_record(record: Record) -> Header {
|
||||
fn with_record(record: Record) -> Header {
|
||||
let capacity = record.signal_count;
|
||||
Header { record: Some(record), signal_specs: Vec::with_capacity(capacity) }
|
||||
}
|
||||
@@ -448,7 +448,7 @@ pub fn parse_header(header_data: &str) -> Result<Header, &str> {
|
||||
match possible_record {
|
||||
Ok(rec) => {
|
||||
specs_max = rec.signal_count;
|
||||
header = Header::from_record(rec);
|
||||
header = Header::with_record(rec);
|
||||
found_record = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user