Skip to content

Commit

Permalink
Replace deprecated uint8_t type with u8
Browse files Browse the repository at this point in the history
  • Loading branch information
9prady9 committed Dec 18, 2019
1 parent 6902eb3 commit 1e9b90a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/backend.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
extern crate libc;

use self::libc::{c_int, c_uint, uint8_t};
use self::libc::{c_int, c_uint};
use crate::defines::{AfError, Backend};
use crate::error::HANDLE_ERROR;

extern "C" {
fn af_set_backend(bknd: uint8_t) -> c_int;
fn af_set_backend(bknd: u8) -> c_int;
fn af_get_backend_count(num_backends: *mut c_uint) -> c_int;
fn af_get_available_backends(backends: *mut c_int) -> c_int;
fn af_get_active_backend(backend: *mut c_int) -> c_int;
Expand All @@ -18,7 +18,7 @@ extern "C" {
/// - `backend` to which to switch to
pub fn set_backend(backend: Backend) {
unsafe {
let err_val = af_set_backend(backend as uint8_t);
let err_val = af_set_backend(backend as u8);
HANDLE_ERROR(AfError::from(err_val));
}
}
Expand Down

0 comments on commit 1e9b90a

Please sign in to comment.