Refactor: remove unnecessery code, improve functionality, you can find a better solution for logic #4

Open
let_rec wants to merge 4 commits from refactors into main
Owner

Summary

We improved the efficiency of code by removing unnecessary libraries, boilerplate codes, etc.

## Summary We improved the efficiency of code by removing unnecessary libraries, boilerplate codes, etc.
chore: add required argument for cli command exec
Some checks are pending
Test CI / test-flake (push) Waiting to run
Test CI / test-project (push) Waiting to run
a53a5b5ce6
fix: remove all unwraps and unnecessary Arc in window/report.rs
Some checks failed
Test CI / test-project (push) Has been cancelled
Test CI / test-flake (push) Has been cancelled
Test CI / test-project (pull_request) Has been cancelled
Test CI / test-flake (pull_request) Has been cancelled
02743058f4
@ -13,4 +12,3 @@
sender.command(|out, shutdown| {
shutdown
.register(async move {
out.send(CmdOut::Progress {
Contributor

better call out.emit, if we dont care with result

https://docs.rs/relm4/0.10.0/relm4/struct.Sender.html#method.emit

better call `out.emit`, if we dont care with result https://docs.rs/relm4/0.10.0/relm4/struct.Sender.html#method.emit
Owner

@ezozbek36 wrote in #4 (comment):

better call out.emit, if we dont care with result

https://docs.rs/relm4/0.10.0/relm4/struct.Sender.html#method.emit

but be careful with error cases. If you do out.send and this conroller dropped (UI closes this window) you may have not get error

@ezozbek36 wrote in https://git.oss.uzinfocom.uz/xinux/relago/pulls/4#issuecomment-186: > better call `out.emit`, if we dont care with result > > https://docs.rs/relm4/0.10.0/relm4/struct.Sender.html#method.emit but be careful with error cases. If you do out.send and this conroller dropped (UI closes this window) you may have not get error
Owner

let _ = action(); style This style is noisy, simple action(); style is better especially if it returns ()

`let _ = action();` style This style is noisy, simple `action();` style is better especially if it returns `()`
@ -14,3 +13,3 @@
shutdown
.register(async move {
out.send(CmdOut::Progress {
let _ = out.send(CmdOut::Progress {
Owner

There is no need for this.

There is no need for this.
Some checks failed
Test CI / test-project (push) Has been cancelled
Test CI / test-flake (push) Has been cancelled
Test CI / test-project (pull_request) Has been cancelled
Test CI / test-flake (pull_request) Has been cancelled
This pull request has changes conflicting with the target branch.
  • crates/cli/src/lib.rs
  • crates/gui/src/window/report.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin refactors:refactors
git switch refactors

Merge

Merge the changes and update on Forgejo.
git switch main
git merge --no-ff refactors
git switch refactors
git rebase main
git switch main
git merge --ff-only refactors
git switch refactors
git rebase main
git switch main
git merge --no-ff refactors
git switch main
git merge --squash refactors
git switch main
git merge --ff-only refactors
git switch main
git merge refactors
git push origin main
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
xinux/relago!4
No description provided.