Skip to content

Conversation

msrd0
Copy link
Collaborator

@msrd0 msrd0 commented Sep 9, 2025

Description

Fixes #170. As a result of removing the 0-fallback and converting the From impls to TryFrom, I had to adjust the InfluxDbWriteable trait and macro. Creating queries may now fail.

Checklist

  • Formatted code using cargo fmt --all
  • Linted code using clippy with reqwest feature: cargo clippy --manifest-path influxdb/Cargo.toml --all-targets --no-default-features --features chrono,time,serde,derive,reqwest-client-rustls -- -D warnings
  • Updated README.md using cargo doc2readme -p influxdb --expand-macros
  • Reviewed the diff. Did you leave any print statements or unnecessary comments?
  • Any unfinished work that warrants a separate issue captured in an issue with a TODO code comment
Copy link
Collaborator

@Empty2k12 Empty2k12 left a 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!");
Copy link
Collaborator

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!?

Copy link
Collaborator Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants