-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
Refatoring of all functions that print to stdout/err so they accept a generic type that implements the Display trait #98
Comments
@MitchellBerend Thanks a lot for collecting all the usages of errors! I marked this issue as blocked by #88 as the For this particular issue, it's a bit hard to evaluate whether it'll simplify the code or make it less maintainable. In theory, specifying the But in any case, if refactoring proposed by this issue makes function signatures more generic and reduces usages of |
|
Should we add a blocked label btw? That seems like a good idea so others don't waste time on issues that can't actually be solved yet. |
The However, this issue is no longer blocked as #88 actually was already done by @zixuanzhang-x 😅 There's no way to specify what issue is blocking inside the label text. So I propose to put the "Blocked by #NUMBER" string in the beginning of every issue that is blocked by something else. |
…lements Display (#100) Resolves #98 This pr converts all functions that accept `&str` to print them out to stdout/err to accept any type that implements `Display` in its stead. This allows these functions to not care about the implementation of the actual print formatting and leaves that up to the implementation of whatever needs to be printed. ### Additional tasks - [x] Documentation for changes provided/changed - [ ] Tests added
The following locations are potential candidates. These should not have a big impact on the rest of the code base, but they allow all the errors and other enums to have the same implementation strategy.
I would love some feedback on this.
src/infra/err.rs
tool-sync/src/infra/err.rs
Lines 3 to 13 in 65b53bd
src/infra/err.rs
tool-sync/src/infra/err.rs
Lines 15 to 31 in 65b53bd
src/infra/err.rs
tool-sync/src/infra/err.rs
Lines 33 to 37 in 65b53bd
src/sync/prefetch.rs
tool-sync/src/sync/prefetch.rs
Lines 39 to 42 in 65b53bd
src/sync/prefetch.rs
tool-sync/src/sync/prefetch.rs
Lines 44 to 64 in 65b53bd
src/sync/progress.rs
tool-sync/src/sync/progress.rs
Lines 87 to 93 in 65b53bd
The text was updated successfully, but these errors were encountered: