Skip to content

Commit 7f47c54

Browse files
committed
Some minor optimizations
1 parent 28931c0 commit 7f47c54

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
[package]
1717
name = "iotdb-client-rs"
18-
version = "0.3.5"
18+
version = "0.3.6"
1919
authors = ["Mark Liu <manlge168@gmial.com>"]
2020
edition = "2021"
2121
license = "Apache-2.0"

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,13 @@ Put this in your `Cargo.toml`:
6161

6262
```toml
6363
[dependencies]
64-
iotdb-client-rs="0.3.5"
64+
iotdb-client-rs="0.3.6"
6565
chrono="0.4.19"
6666
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)