-
Notifications
You must be signed in to change notification settings - Fork 2
Update dependencies & stricter clippy #1
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
Changes from all commits
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 |
|---|---|---|
| @@ -1,5 +1,7 @@ | ||
| [workspace] | ||
|
|
||
| resolver = "2" | ||
|
|
||
| members = [ | ||
| "spotflow", | ||
| "spotflow-c", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| allow-expect-in-tests = true | ||
| allow-unwrap-in-tests = true | ||
| doc-valid-idents = ["IoT", "SQLite", ".."] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| [toolchain] | ||
| channel = "1.80.1" | ||
|
Collaborator
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. Is there any advantage of setting the toolchain to a fixed version? We currently always use the current version in CI (i.e. the version installed on the current runner) and AFAIK it works quite well. For example, we don't have to think about updating the toolchain manually. But maybe there's something I'm missing. |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -59,7 +59,13 @@ impl<'de> Visitor<'de> for DurationVisitor { | |
| let hours: u64; | ||
| // let mut microseconds = 0; | ||
|
|
||
| let parts: Vec<&str> = s.split(':').collect(); | ||
| let parts: [&str; 3] = s.split(':').collect::<Vec<_>>().try_into().map_err(|_| { | ||
| de::Error::invalid_value( | ||
| Unexpected::Str("Duration did not contain two colons."), | ||
| &self, | ||
| ) | ||
| })?; | ||
|
|
||
| let day_and_hour = parts[0]; | ||
| let minutes: u64 = parts[1].parse().map_err(|_| { | ||
| de::Error::invalid_value( | ||
|
|
@@ -131,7 +137,7 @@ mod tests { | |
| fn deser_duration() { | ||
| let s = "\"8.11:55:36.3296177\""; | ||
| let d: Duration = serde_json::from_str::<DurationWrapper>(s).unwrap().into(); | ||
| assert_eq!(d.as_secs(), 734136); | ||
| assert_eq!(d.as_secs(), 734_136); | ||
| } | ||
|
|
||
| #[test] | ||
|
|
@@ -156,7 +162,7 @@ mod tests { | |
| } | ||
|
|
||
| #[test] | ||
| #[should_panic] | ||
| #[should_panic(expected = "This duration cannot be deserialized.")] | ||
|
Collaborator
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 tests fails because the string |
||
| fn deser_duration_fail() { | ||
| let s = "\"10:39\""; | ||
| let _d: Duration = serde_json::from_str::<DurationWrapper>(s).unwrap().into(); | ||
|
|
||
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.
I saw that
sqlxchanged the format of its offline query metadata - instead of using the single filesqlx-data.jsonthey now save the queries as individual files to the.sqlxdirectory. Therefore, the CI build fails now. Can you please runcargo sqlx preparein thespotflowdirectory (you'll probably need to runcargo install sqlx-cli@0.7.4before that) and then commit all the generated files? And also deletesqlx-data.json?Btw. I'd like to investigate if it wouldn't be easier to just use
dev.dbon CI as well so that we could get rid of callingcargo sqlx preparealtogether. Do you think it would work? Or are there any problems you encountered when working on this earlier?