Skip to content

Commit

Permalink
Merge pull request #56 from OlivierDehaene/master
Browse files Browse the repository at this point in the history
fix: Use c_char instead of i8
  • Loading branch information
Enet4 authored Jun 13, 2022
2 parents 8ca0daa + b833029 commit e2e012c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index/ivf_flat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -116,7 +116,7 @@ pub enum TrainType {
}

impl TrainType {
pub(crate) fn from_code(code: i8) -> Option<Self> {
pub(crate) fn from_code(code: c_char) -> Option<Self> {
match code {
0 => Some(TrainType::QuantizerAsIndex),
1 => Some(TrainType::QuantizerTrainsAlone),
Expand Down

0 comments on commit e2e012c

Please sign in to comment.