-
Notifications
You must be signed in to change notification settings - Fork 85
Remove non-utc trait impls and make InfluxDbWriteable fail-able #174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I didn't know core::error::Error would be a problem ... TIL
Better than the MSRV of 1.81 for core::error But I'd really like to use write! in proc-macros ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
| for wf in &writeable_fields { | ||
| if wf.is_time { | ||
| if time_field.is_some() { | ||
| panic!("multiple time fields found!"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer return Err(syn::Error::new(...)) or compile_error!?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer syn::Error, we have code that turns it into a compile error later: https://github.com/influxdb-rs/influxdb-rust/blob/main/influxdb_derive/src/lib.rs#L10
|
@Empty2k12 can this be merged? The panic you mentioned above was not introduced in this PR, so I'd argue it's not in scope here to remove it (eventhough it should be removed) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
Fixes #170. As a result of removing the
0-fallback and converting theFromimpls toTryFrom, I had to adjust theInfluxDbWriteabletrait and macro. Creating queries may now fail.Checklist
cargo fmt --allcargo clippy --manifest-path influxdb/Cargo.toml --all-targets --no-default-features --features chrono,time,serde,derive,reqwest-client-rustls -- -D warningscargo doc2readme -p influxdb --expand-macrosAny unfinished work that warrants a separate issue captured in an issue with a TODO code comment