Skip to content

Commit

Permalink
Adapt to new redismodule-rs API (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
gavrie authored Oct 13, 2020
1 parent 4066ec6 commit ae34b0a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "redisearch_api"
version = "0.4.4"
version = "0.5.0"
authors = ["Gavrie Philipson <[email protected]>", "Guy Korland <[email protected]>"]
edition = "2018"
description = "Rust RediSearch API binding"
Expand All @@ -14,7 +14,7 @@ crate-type = ["cdylib"]


[dependencies]
redis-module = { version="0.9.2", features = ["experimental-api"]}
redis-module = { version="0.11", features = ["experimental-api"]}
bitflags = "1.1"
libc = "0.2"
time = "0.1"
Expand Down
4 changes: 2 additions & 2 deletions src/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,12 @@ impl Index {
};

if !err_ptr.is_null() {
let err = unsafe { CStr::from_ptr(err_ptr) }.to_str()?.to_owned();
let message = unsafe { CStr::from_ptr(err_ptr) }.to_str()?.to_owned();

// FIXME: free() the err_ptr value.
// This should be exposed from the RediSearch API. Talk to Meir.

return Err(err.into());
return Err(RedisError::String(message));
}

Ok(ResultsIterator::from_raw(results_iter, self)?)
Expand Down

0 comments on commit ae34b0a

Please sign in to comment.