fix get_name return type

This commit is contained in:
do butterflies cry? 2026-03-19 01:38:27 +10:00
parent 6d0b5b7eea
commit 6b1ca1463f
Signed by: cry
GPG key ID: F68745A836CA0412

View file

@ -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,
}