Skip to content

Instantly share code, notes, and snippets.

@Enet4
Created April 11, 2018 18:52
Show Gist options
  • Save Enet4/780467f4d3c286773f80f210e8c45672 to your computer and use it in GitHub Desktop.
Save Enet4/780467f4d3c286773f80f210e8c45672 to your computer and use it in GitHub Desktop.
faiss_try! macro at lib.rs in faiss-rs
macro_rules! faiss_try {
($e: expr) => {{
let c = $e;
if c != 0 {
return Err(::error::NativeError::from_last_error(c).into());
}
}}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment