Merged
Conversation
6088278 to
1d1c2aa
Compare
Signed-off-by: james-parky <72101291+james-parky@users.noreply.github.com>
This constant is intrinsically connected to the retry_loop() function and therefore doesn't make sense to be free -- it is not used anywhere else. Signed-off-by: james-parky <72101291+james-parky@users.noreply.github.com>
A slight refactor to the retry_loop() function to make it more idiomatic
and shorter.
- Rather than have a u64 representing the retry interval, just make it a
Duration, which is what it is. This also allows you to drop the
INTERVAL_MSEC suffix as the fact it is built with Duration::from_millis
makes that clear.
- Rather than using a infinite loop {}, just use a regular for loop of
max_tries - 1. If all attempts at calling func() have resulted in an Err
when we exit this for loop, we just return calling func() for the last
time.
- There is no need to @-bind err in the Err match arm since it is not used
anyway, so simplify with just a match on Err(_).
- Similarly, remove the @-binding for the Ok arm since it is neadlessly
verbose.
Signed-off-by: james-parky <72101291+james-parky@users.noreply.github.com>
Signed-off-by: james-parky <72101291+james-parky@users.noreply.github.com>
1d1c2aa to
7cf4af0
Compare
Member
|
For some reason code scanning is not running, and that prevents merge, anyway I will by pass and merge. (After merge code scanning anyway ran and passed. https://github.com/flatcar/ue-rs/actions/runs/17204479070) |
dongsupark
added a commit
to flatcar/scripts
that referenced
this pull request
Sep 26, 2025
Pulls in flatcar/ue-rs#72, flatcar/ue-rs#74, flatcar/ue-rs#84, flatcar/ue-rs#85, flatcar/ue-rs#87, flatcar/ue-rs#88. Signed-off-by: Dongsu Park <dongsu@dpark.io>
dongsupark
added a commit
to flatcar/scripts
that referenced
this pull request
Sep 26, 2025
Pulls in flatcar/ue-rs#72, flatcar/ue-rs#74, flatcar/ue-rs#84, flatcar/ue-rs#85, flatcar/ue-rs#87, flatcar/ue-rs#88. Signed-off-by: Dongsu Park <dongsu@dpark.io>
dongsupark
added a commit
to flatcar/scripts
that referenced
this pull request
Sep 26, 2025
Pulls in flatcar/ue-rs#72, flatcar/ue-rs#84, flatcar/ue-rs#85, flatcar/ue-rs#87, flatcar/ue-rs#88. Signed-off-by: Dongsu Park <dongsu@dpark.io>
1 task
dongsupark
added a commit
to flatcar/scripts
that referenced
this pull request
Sep 26, 2025
Pulls in flatcar/ue-rs#72, flatcar/ue-rs#84, flatcar/ue-rs#85, flatcar/ue-rs#87, flatcar/ue-rs#88, flatcar/ue-rs#90. Signed-off-by: Dongsu Park <dongsu@dpark.io>
dongsupark
added a commit
to flatcar/scripts
that referenced
this pull request
Sep 27, 2025
Pulls in flatcar/ue-rs#72, flatcar/ue-rs#84, flatcar/ue-rs#85, flatcar/ue-rs#87, flatcar/ue-rs#88, flatcar/ue-rs#90. Signed-off-by: Dongsu Park <dongsu@dpark.io>
dongsupark
added a commit
to flatcar/scripts
that referenced
this pull request
Sep 27, 2025
Pulls in flatcar/ue-rs#72, flatcar/ue-rs#84, flatcar/ue-rs#85, flatcar/ue-rs#87, flatcar/ue-rs#88, flatcar/ue-rs#90. Signed-off-by: Dongsu Park <dongsu@dpark.io>
dongsupark
added a commit
to flatcar/scripts
that referenced
this pull request
Sep 30, 2025
Pulls in flatcar/ue-rs#72, flatcar/ue-rs#84, flatcar/ue-rs#85, flatcar/ue-rs#87, flatcar/ue-rs#88, flatcar/ue-rs#90. Signed-off-by: Dongsu Park <dongsu@dpark.io>
cnd4
pushed a commit
to cnd4/flatcar-scripts
that referenced
this pull request
Oct 3, 2025
Pulls in flatcar/ue-rs#72, flatcar/ue-rs#84, flatcar/ue-rs#85, flatcar/ue-rs#87, flatcar/ue-rs#88, flatcar/ue-rs#90. Signed-off-by: Dongsu Park <dongsu@dpark.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improvements to the util module
There is currently only one function in the
utilmodule:retry_loop(). This PR improves this function (and therefore module) in that it:retry_loop()as per [Tracking] implement unit tests #77.