]> git.sesse.net Git - bcachefs-tools-debian/commit
printbuf_to_formatter: Lossy display of non-UTF-8 printbufs
authorGabriel <g2p.code@gmail.com>
Mon, 29 Jan 2024 13:33:15 +0000 (14:33 +0100)
committerGabriel <g2p.code@gmail.com>
Mon, 29 Jan 2024 13:34:24 +0000 (14:34 +0100)
commitf8f10530f16c169f2ea1667766221352c71514d8
tree9a6be93c35d4e505c3fe685f1297e6196343524e
parentda4bbf51d047035f99cfc67da810e6086f31626a
printbuf_to_formatter: Lossy display of non-UTF-8 printbufs

Use to_string_lossy in printbuf_to_formatter, which tolerates
non-UTF-8 strings (by using replacement characters).

This is used in various Display impls, and allows something like:
bcachefs list --btree dirents
with non-UTF-8 paths.
bch_bindgen/src/lib.rs