(result: bool, error: *mut i8)
| 1352 | } |
| 1353 | |
| 1354 | unsafe fn bool_result(result: bool, error: *mut i8) -> Result<(), AppError> { |
| 1355 | if result { |
| 1356 | Ok(()) |
| 1357 | } else { |
| 1358 | Err(take_error(error).unwrap_or_else(|| AppError::native("Unknown native error."))) |
| 1359 | } |
| 1360 | } |
| 1361 | |
| 1362 | unsafe fn take_error(raw: *mut i8) -> Option<AppError> { |
| 1363 | if raw.is_null() { |
no test coverage detected