Closed
Description
Example from @BurntSushi - when iterating over rows of a CSV file, we would like to be able to reuse the same five String buffers on every row.
#[derive(Debug, Deserialize, PartialEq)]
struct MBTARow {
trip_id: String,
arrival_time: String,
departure_time: String,
stop_id: String,
stop_sequence: i32,
stop_headsign: String,
pickup_type: i32,
drop_off_type: i32,
timepoint: i32,
}
The use case is similar to Clone::clone_from
.