felipecrv commented on code in PR #4141:
URL: https://github.com/apache/arrow-adbc/pull/4141#discussion_r3037411424
##########
rust/core/src/error.rs:
##########
@@ -102,10 +102,26 @@ impl Error {
impl Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ let safe_ascii = |c: c_char| -> char {
+ if c == 0 {
+ '0'
Review Comment:
That's why Rust (wisely) has the `fmt::Debug` and `fmt::Display` traits.
`Debug` is for the developer. The derived `Debug` will print exactly what you
are asking. `Display` is the "human" rendering.
When I do a `to_string()` on a error, `Display::fmt` is called because I'm
rending a message to a human.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]