Skip to content

Commit e69c2aa

Browse files
authored
Merge pull request #587 from Magister/fix/native_config_get
Fix panic on getting config value from NativeConfig
2 parents eacf173 + 353812f commit e69c2aa

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/config.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,7 @@ impl NativeClientConfig {
150150
}
151151

152152
// Convert the C string to a Rust string.
153-
Ok(CStr::from_bytes_with_nul(&buf)
154-
.unwrap()
155-
.to_string_lossy()
156-
.into())
153+
Ok(String::from_utf8_lossy(&buf).to_string())
157154
}
158155
}
159156

0 commit comments

Comments
 (0)