pub fn generate_srec_file(records: &[Record]) -> String {
    records
        .iter()
        .map(Record::encode)
        .map(|s| {
            let mut s2 = s.clone();
            s2.push('\n');
            s2
        })
        .collect()
}
/// Converts each provided record to a string, joining them with newlines ('\n')
/// to generate an LF terminated SREC file
///
/// Does not perform any validation on the provided records. The caller is
/// responsible for ensuring records do not contain duplicate/overlapping data
/// and that records are in the correct order.
///
/// # Examples
///
/// ```rust
/// let s = srec::writer::generate_srec_file(&[
///     srec::Record::S0("HDR".into()),
///     srec::Record::S1(srec::Data {
///         address: srec::Address16(0x1234),
///         data: vec![0x00, 0x01, 0x02, 0x03],
///     }),
///     srec::Record::S1(srec::Data {
///         address: srec::Address16(0x1238),
///         data: vec![0x04, 0x05, 0x06, 0x07],
///     }),
///     srec::Record::S9(srec::Address16(0x1234)),
/// ]);
///
/// assert_eq!(
///     s,
///     "S00600004844521B\nS107123400010203AC\nS10712380405060798\nS9031234B6\n"
/// );
/// ```
Converts each provided record to a string, joining them with newlines ('\n')
to generate an LF terminated SREC file

Does not perform any validation on the provided records. The caller is
responsible for ensuring records do not contain duplicate/overlapping data
and that records are in the correct order.
Converts each provided record to a string joining them with newlines ( ' \ n ' ) to generate an LF terminated SREC file Does not perform any validation on the provided records . The caller is responsible for ensuring records do not contain duplicate / overlapping data and that records are in the correct order .
pub fn generate_srec_file(records: &[Record]) -> String {
    records
        .iter()
        .map(Record::encode)
        .map(|s| {
            let mut s2 = s.clone();
            s2.push('\n');
            s2
        })
        .collect()
}
pub fn generate_srec_file ( records : & [ Record ] ) -> String { records . iter ( ) . map ( Record :: encode ) . map ( | s | { let mut s2 = s . clone ( ) ; s2 . push ( '\n' ) ; s2 } ) . collect ( ) }
Converts each provided record to a string, joining them with newlines ('\n')
to generate an LF terminated SREC file
Converts each provided record to a string joining them with newlines ( ' \ n ' ) to generate an LF terminated SREC file
records
&[Record]
examples
None