mirror of https://github.com/fede1024/rust-rdkafka
Merge pull request #587 from Magister/fix/native_config_get
Fix panic on getting config value from NativeConfig
This commit is contained in:
commit
e69c2aa40c
|
@ -150,10 +150,7 @@ impl NativeClientConfig {
|
|||
}
|
||||
|
||||
// Convert the C string to a Rust string.
|
||||
Ok(CStr::from_bytes_with_nul(&buf)
|
||||
.unwrap()
|
||||
.to_string_lossy()
|
||||
.into())
|
||||
Ok(String::from_utf8_lossy(&buf).to_string())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue