Printing the actual lines rather than str::lines + \n

[?]
Dec 4, 2020, 9:15 PM
OXMYGLW2563T6VA75532P7N7CZBHVJL4VI5CQBJ6X4MOX4RKL4GAC

Dependencies

  • [2] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).

Change contents

  • replacement in libpijul/src/change.rs at line 2503
    [2.921884][2.921884:921987](),[2.921987][2.921987:922035]()
    if let Ok(contents) = std::str::from_utf8(&contents) {
    for l in contents.lines() {
    writeln!(w, "{} {}", pref, l)?;
    [2.921884]
    [2.922035]
    if let Ok(mut contents) = std::str::from_utf8(&contents) {
    while let Some(n) = contents.chars().position(|c| c == '\n') {
    let (a, b) = contents.split_at(n + 1);
    contents = b;
    write!(w, "{} {}", pref, a)?;
    }
    if !contents.is_empty() {
    writeln!(w, "{} {}", pref, contents)?;