mirror of https://github.com/restic/restic.git
avoiding unnecessary type conversions
This commit is contained in:
parent
8b22fe29cf
commit
76d1866444
|
@ -129,7 +129,7 @@ func (t *Table) Write(w io.Writer) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
row = append(row, string(buf.Bytes()))
|
row = append(row, buf.String())
|
||||||
buf.Reset()
|
buf.Reset()
|
||||||
}
|
}
|
||||||
lines = append(lines, row)
|
lines = append(lines, row)
|
||||||
|
|
|
@ -154,7 +154,7 @@ foo 2018-08-19 22:22:22 xxx other /home/user/other
|
||||||
}
|
}
|
||||||
|
|
||||||
want := strings.TrimLeft(test.output, "\n")
|
want := strings.TrimLeft(test.output, "\n")
|
||||||
if string(buf.Bytes()) != want {
|
if buf.String() != want {
|
||||||
t.Errorf("wrong output\n---- want ---\n%s\n---- got ---\n%s\n-------\n", want, buf.Bytes())
|
t.Errorf("wrong output\n---- want ---\n%s\n---- got ---\n%s\n-------\n", want, buf.Bytes())
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue