@@ -93,17 +93,18 @@ async fn main() {
93
93
}. into_query (" weather" ),
94
94
);
95
95
96
- let write_result = client
97
- . query ( weather_readings )
98
- . await ;
99
- assert! ( write_result . is_ok (), " Write result was not okay " );
96
+ if let Err ( e ) = client . query ( weather_readings ) . await {
97
+ println! ( " Error writing result: {e} " );
98
+ return ;
99
+ }
100
100
101
101
// Let's see if the data we wrote is there
102
102
let read_query = ReadQuery :: new (" SELECT * FROM weather" );
103
103
104
- let read_result = client . query (read_query ). await ;
105
- assert! (read_result . is_ok (), " Read result was not ok" );
106
- println! (" {}" , read_result . unwrap ());
104
+ match client . query (read_query ). await {
105
+ Ok (read_result ) => println! (" {}" , read_result ),
106
+ Err (e ) => println! (" Error reading result: {e}" ),
107
+ }
107
108
}
108
109
```
109
110
@@ -167,7 +168,7 @@ To communicate with InfluxDB, you can choose the HTTP backend to be used configu
167
168
@ 2020 Gero Gerke and [ contributors] .
168
169
169
170
[ contributors ] : https://github.com/influxdb-rs/influxdb-rust/graphs/contributors
170
- [ __cargo_doc2readme_dependencies_info ] : ggGkYW0BYXSEG64av5CnNoNoGw8lPMr2b0MoG44uU0T70vGSG7osgcbjN7SoYXKEG1WEE9zY5dHaG_H-oHwVY518G_Hz3Ch_FlkHG6679elOy6u-YWSBgmhpbmZsdXhkYmUwLjcuMQ
171
+ [ __cargo_doc2readme_dependencies_info ] : ggGkYW0BYXSEG64av5CnNoNoGw8lPMr2b0MoG44uU0T70vGSG7osgcbjN7SoYXKEG_D2JHss1jsUG6eXkB7MmDoIG9miwB7MgvlwG_-cxCbQ3T7bYWSBgmhpbmZsdXhkYmUwLjcuMQ
171
172
[ __link0 ] : https://github.com/influxdb-rs/influxdb-rust/blob/main/CONTRIBUTING.md
172
173
[ __link1 ] : https://github.com/influxdb-rs/influxdb-rust/blob/main/CODE_OF_CONDUCT.md
173
174
[ __link10 ] : https://curl.se/libcurl/
0 commit comments