Merge pull request #587 from Magister/fix/native_config_get

Fix panic on getting config value from NativeConfig
This commit is contained in:
David Blewett 2024-01-19 09:59:15 -05:00 committed by GitHub
commit e69c2aa40c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 4 deletions

View File

@ -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())
}
}