From b833029646af1cff74eec9f0a8bce413812e5cb2 Mon Sep 17 00:00:00 2001 From: odehaene Date: Sat, 11 Jun 2022 22:22:22 +0200 Subject: [PATCH] fix: Use c_char instead of i8 --- src/index/ivf_flat.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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),