-
Notifications
You must be signed in to change notification settings - Fork 54
chore: Fix CI #128
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
chore: Fix CI #128
Changes from all commits
0f17da9
c3ad2d9
f1ba974
ccbd063
d1d3d63
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -380,6 +380,11 @@ fn write_serialize_scalar_variable<W: Write>( | |
| "{}#[allow(clippy::needless_borrow)]", | ||
| Indent(indent) | ||
| )?; | ||
| writeln!( | ||
| writer, | ||
| "{}#[allow(clippy::needless_borrows_for_generic_args)]", | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. apparently the new version of clippy flags some of this code as "needless borrows" but under a different lint ( |
||
| Indent(indent) | ||
| )?; | ||
| writeln!( | ||
| writer, | ||
| "{}struct_ser.serialize_field(\"{}\", {}(&{}).as_str())?;", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| use crate::Timestamp; | ||
| use chrono::{DateTime, NaiveDateTime, TimeZone, Utc}; | ||
| use chrono::{DateTime, Utc}; | ||
| use serde::de::Visitor; | ||
| use serde::Serialize; | ||
|
|
||
|
|
@@ -8,14 +8,13 @@ impl TryFrom<Timestamp> for DateTime<Utc> { | |
| fn try_from(value: Timestamp) -> Result<Self, Self::Error> { | ||
| let Timestamp { seconds, nanos } = value; | ||
|
|
||
| let dt = NaiveDateTime::from_timestamp_opt( | ||
| Self::from_timestamp( | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is needed to get clippy passing https://app.circleci.com/pipelines/github/influxdata/pbjson/274/workflows/b620d772-632d-4dd8-bc83-cd9a0e01a30b/jobs/1431 Newer versions of Chrono have deprecated several APIs |
||
| seconds, | ||
| nanos | ||
| .try_into() | ||
| .map_err(|_| "out of range integral type conversion attempted")?, | ||
| ) | ||
| .ok_or("invalid or out-of-range datetime")?; | ||
| Ok(Utc.from_utc_datetime(&dt)) | ||
| .ok_or("invalid or out-of-range datetime") | ||
| } | ||
| } | ||
|
|
||
|
|
@@ -33,7 +32,7 @@ impl Serialize for Timestamp { | |
| where | ||
| S: serde::Serializer, | ||
| { | ||
| let t: DateTime<Utc> = self.clone().try_into().map_err(serde::ser::Error::custom)?; | ||
| let t: DateTime<Utc> = (*self).try_into().map_err(serde::ser::Error::custom)?; | ||
| serializer.serialize_str(t.to_rfc3339().as_str()) | ||
| } | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| [toolchain] | ||
| channel = "1.72" | ||
| channel = "1.74" | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| components = ["rustfmt", "clippy"] | ||
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.
This is the fix for https://app.circleci.com/pipelines/github/influxdata/pbjson/274/workflows/b620d772-632d-4dd8-bc83-cd9a0e01a30b/jobs/1432
It appears the new version of protoc needs its libraries updated as well