diff --git a/src/index/ivf_flat.rs b/src/index/ivf_flat.rs index 8ac9411..e710162 100644 --- a/src/index/ivf_flat.rs +++ b/src/index/ivf_flat.rs @@ -5,7 +5,7 @@ use super::*; use crate::error::Result; use crate::faiss_try; use std::mem; -use std::os::raw::c_int; +use std::os::raw::{c_int, c_char}; use std::ptr; /// Alias for the native implementation of a flat index. @@ -116,7 +116,7 @@ pub enum TrainType { } impl TrainType { - pub(crate) fn from_code(code: i8) -> Option { + pub(crate) fn from_code(code: c_char) -> Option { match code { 0 => Some(TrainType::QuantizerAsIndex), 1 => Some(TrainType::QuantizerTrainsAlone),