fix get_name return type
This commit is contained in:
parent
6d0b5b7eea
commit
6b1ca1463f
1 changed files with 2 additions and 1 deletions
|
|
@ -139,11 +139,12 @@ impl ErrorContext {
|
|||
|
||||
pub(crate) fn get_name(&self, result: NixResult<()>) -> Option<String> {
|
||||
match result {
|
||||
Err(code) => unsafe {
|
||||
Err(_) => unsafe {
|
||||
let ctx = null_mut();
|
||||
wrap_libnix_string_callback("nix_err_name", |callback, user_data| {
|
||||
sys::nix_err_name(ctx, self.as_ptr(), Some(callback), user_data)
|
||||
})
|
||||
.ok()
|
||||
},
|
||||
Ok(_) => None,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue