Skip to content

Commit 39c6542

Browse files
committed
remove logs
1 parent c9a28b5 commit 39c6542

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

src/index.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,14 @@ pub struct Field<'a> {
1717
field_id: RSFieldID,
1818
}
1919

20-
macro_rules! debug {
21-
($($arg:tt)*) => ({
22-
println!($($arg)*);
23-
})
24-
}
25-
2620
impl Index {
2721
pub fn create(name: &str) -> Self {
28-
debug!("Creating index '{}'", name);
29-
3022
let name = CString::new(name).unwrap();
3123
let index = unsafe { raw::RediSearch_CreateIndex(name.as_ptr(), ptr::null()) };
3224
Self { inner: index }
3325
}
3426

3527
pub fn create_with_options(name: &str, options: &IndexOptions) -> Self {
36-
debug!("Creating index with options '{}'", name);
3728
let index_options =
3829
unsafe { raw::RediSearch_CreateIndexOptions().as_mut() }.expect("null IndexOptions");
3930

@@ -48,7 +39,6 @@ impl Index {
4839
}
4940

5041
pub fn create_field(&self, name: &str) -> Field {
51-
debug!("Creating index field '{}'", name);
5242
let name = CString::new(name).unwrap();
5343

5444
// We want to let the document decide the type, so we support all types.
@@ -65,7 +55,6 @@ impl Index {
6555
}
6656

6757
pub fn add_document(&self, doc: &Document) -> Result<(), RedisError> {
68-
debug!("Adding document to index");
6958
let status = unsafe {
7059
raw::RediSearch_IndexAddDocument(
7160
self.inner,
@@ -133,9 +122,6 @@ impl Iterator for ResultsIterator<'_> {
133122
// A null pointer means we have no results.
134123
return None;
135124
}
136-
137-
debug!("Getting next result");
138-
139125
let mut len = 0usize;
140126
let key = unsafe {
141127
let raw_key =
@@ -160,8 +146,6 @@ impl Drop for ResultsIterator<'_> {
160146
if self.inner.is_null() {
161147
return;
162148
}
163-
164-
debug!("Freeing results iterator");
165149
unsafe {
166150
raw::RediSearch_ResultsIteratorFree(self.inner);
167151
};

0 commit comments

Comments
 (0)