-
Notifications
You must be signed in to change notification settings - Fork 16
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
Update: modernize to rust 1.65 #337
Conversation
* use workspace cargo dependencies to ensure crate/meta consistency * update libraries and calls * include `-A dead_code` to clippy to get around `future_state_machine` * modern fmt/clippy recommendations
* Add local overrides to contract test script for local testing
] | ||
edition = "2021" | ||
|
||
[workspace.dependencies] |
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.
Cool, I hadn't even noticed this stuff in the 1.64 release notes. cc: @ethowitz
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 neat! I'll definitely use this on the syncstorage crate reorg
autoendpoint/src/tags.rs
Outdated
@@ -92,6 +92,7 @@ impl Tags { | |||
} | |||
} | |||
|
|||
/* |
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.
Why commented out, is this just not used in autoendpoint?
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.
It's commented out because the slog::Key::from(key.clone())
no longer produces a string that is equivalent to `static. I'd like to eventually return the function, but for now, I've gone and converted the Keys to a formatted value.
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 really confused me after seeing the slog::Key
docs state it implements impl From<String> for Key
-- turns out it only really uses the "dynamic" version of Key
when the dynamic-keys
feature flag is enabled, which we're missing. So switching it back on should let us uncomment this again.
let encoding = if public_key.contains(['/', '+']) { | ||
base64::STANDARD_NO_PAD | ||
let engine = if public_key.contains(['/', '+']) { | ||
base64::engine::fast_portable::FastPortable::from( |
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.
Let's take advantage of FastPortable::from
being a const method and make all them constants (at least outside of tests, also have some in endpoint.rs
and notification.rs
), its docs recommend it even though they're not very expensive to construct.
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.
Ah, cool! Didn't see that in the docs. I was mostly just focused on getting the stuff working.
-A dead_code
to clippy to get aroundfuture_state_machine