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

@msrd0
Copy link
Collaborator Author

msrd0 commented Nov 2, 2025

@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)

@Empty2k12 Empty2k12 enabled auto-merge (squash) November 3, 2025 15:02
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.

LGTM

@Empty2k12 Empty2k12 merged commit 15b88d7 into main Nov 4, 2025
18 checks passed
@Empty2k12 Empty2k12 deleted the utconly branch November 4, 2025 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Restrict DateTime support to Utc only

3 participants