Skip to content

Commit ad1f2f3

Browse files
committed
Some minor optimizations
1 parent 28931c0 commit ad1f2f3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ prettytable-rs="0.8.0"
6767
```
6868
## Example
6969

70+
```rust
7071
use std::vec;
7172

7273
use chrono;
@@ -401,3 +402,4 @@ fn create_tablet(row_count: i32, start_timestamp: i64) -> Tablet {
401402
});
402403
tablet
403404
}
405+
```

src/client/remote.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,8 @@ impl<'a> RpcDataSet<'a> {
240240
if self.closed {
241241
return false;
242242
}
243-
if let Some(session_id) = self.session.session_id {
244-
if self.query_data_set.time.len() == 0 {
243+
if self.query_data_set.time.len() == 0 {
244+
if let Some(session_id) = self.session.session_id {
245245
//Fetching result from iotdb server
246246
match self
247247
.session
@@ -306,10 +306,8 @@ impl<'a> RpcDataSet<'a> {
306306
}
307307
}
308308
}
309-
self.query_data_set.time.len() > 0
310-
} else {
311-
return false;
312309
}
310+
self.query_data_set.time.len() > 0
313311
}
314312
}
315313

0 commit comments

Comments
 (0)