Skip to content
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

refact: minor fixes #971

Merged
merged 2 commits into from
Jan 10, 2025

Conversation

jeevithakannan2
Copy link
Contributor

@jeevithakannan2 jeevithakannan2 commented Nov 30, 2024

Type of Change

  • Refactoring

Description

  • Fix unnecessary usage of pub mod appstate and unused float handle mouse function.
  • Fix the below clippy warnings with new rust version.
warning: the following explicit lifetimes could be elided: 'a
   --> tui/src/floating_text.rs:174:6
    |
174 | impl<'a> FloatContent for FloatingText<'a> {
    |      ^^                                ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    = note: `#[warn(clippy::needless_lifetimes)]` on by default
help: elide the lifetimes
    |
174 - impl<'a> FloatContent for FloatingText<'a> {
174 + impl FloatContent for FloatingText<'_> {
    |

warning: manually reimplementing `div_ceil`
  --> tui/src/hint.rs:39:16
   |
39 |     let rows = (shortcut_spans.len() + columns - 1) / columns;
   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `shortcut_spans.len().div_ceil(columns)`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil
   = note: `#[warn(clippy::manual_div_ceil)]` on by default

warning: `linutil_tui` (bin "linutil") generated 2 warnings (run `cargo clippy --fix --bin "linutil"` to apply 2 suggestions)

Testing

  • Tested on arch linux without any issues.

Checklist

  • My code adheres to the coding and style guidelines of the project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • My changes generate no errors/warnings/merge conflicts.

Fix unnecessary usage of pub mod for appstate and resolve unused float handle mouse function
@jeevithakannan2 jeevithakannan2 changed the title Fix unused handle mouse function, pub mod appstate Fix unused handle mouse function, pub mod appstate and some clippy warnings Nov 30, 2024
@jeevithakannan2 jeevithakannan2 marked this pull request as draft November 30, 2024 12:57
Remove explicit lifetime for floatcontent impl. Use div_ceil instead of manually calculating the rows for hints
@adamperkowski adamperkowski changed the title Fix unused handle mouse function, pub mod appstate and some clippy warnings refact: minor fixes Jan 10, 2025
@ChrisTitusTech ChrisTitusTech merged commit 06c9a41 into ChrisTitusTech:main Jan 10, 2025
2 checks passed
Jaredy899 added a commit to Jaredy899/linutil that referenced this pull request Jan 10, 2025
* chore: update copyright year (ChrisTitusTech#988)

* refact: minor fixes (ChrisTitusTech#971)

* Fix unused float handle mouse function, pub mod appstate

Fix unnecessary usage of pub mod for appstate and resolve unused float handle mouse function

* Resolve clippy warnings

Remove explicit lifetime for floatcontent impl. Use div_ceil instead of manually calculating the rows for hints

---------

Co-authored-by: Adam Perkowski <[email protected]>
Co-authored-by: Jeevitha Kannan K S <[email protected]>
Jaredy899 added a commit to Jaredy899/linutil that referenced this pull request Jan 10, 2025
* chore: update copyright year (ChrisTitusTech#988)

* refact: minor fixes (ChrisTitusTech#971)

* Fix unused float handle mouse function, pub mod appstate

Fix unnecessary usage of pub mod for appstate and resolve unused float handle mouse function

* Resolve clippy warnings

Remove explicit lifetime for floatcontent impl. Use div_ceil instead of manually calculating the rows for hints

---------

Co-authored-by: Adam Perkowski <[email protected]>
Co-authored-by: Jeevitha Kannan K S <[email protected]>
Jaredy899 added a commit to Jaredy899/linutil that referenced this pull request Jan 10, 2025
* chore: update copyright year (ChrisTitusTech#988)

* refact: minor fixes (ChrisTitusTech#971)

* Fix unused float handle mouse function, pub mod appstate

Fix unnecessary usage of pub mod for appstate and resolve unused float handle mouse function

* Resolve clippy warnings

Remove explicit lifetime for floatcontent impl. Use div_ceil instead of manually calculating the rows for hints

* chore(release): prepare for 25.1.10 (ChrisTitusTech#991)

* Update linutil.yml (ChrisTitusTech#993)

---------

Co-authored-by: Adam Perkowski <[email protected]>
Co-authored-by: Jeevitha Kannan K S <[email protected]>
Co-authored-by: Chris Titus <[email protected]>
Jaredy899 added a commit to Jaredy899/linutil that referenced this pull request Jan 10, 2025
* service

* usb support for void

* revert

* Update common-service-script.sh

* Update system-update.sh

* fix bluez install

* Update samba-ssh-setup.sh

* Update samba-ssh-setup.sh

* sync with previous runit pr

* merge (#4)

* chore: update copyright year (ChrisTitusTech#988)

* refact: minor fixes (ChrisTitusTech#971)

* Fix unused float handle mouse function, pub mod appstate

Fix unnecessary usage of pub mod for appstate and resolve unused float handle mouse function

* Resolve clippy warnings

Remove explicit lifetime for floatcontent impl. Use div_ceil instead of manually calculating the rows for hints

* chore(release): prepare for 25.1.10 (ChrisTitusTech#991)

* Update linutil.yml (ChrisTitusTech#993)

---------

Co-authored-by: Adam Perkowski <[email protected]>
Co-authored-by: Jeevitha Kannan K S <[email protected]>
Co-authored-by: Chris Titus <[email protected]>

---------

Co-authored-by: Adam Perkowski <[email protected]>
Co-authored-by: Jeevitha Kannan K S <[email protected]>
Co-authored-by: Chris Titus <[email protected]>
Jaredy899 added a commit to Jaredy899/linutil that referenced this pull request Jan 10, 2025
* add compile for solus

* Update meld-setup.sh

* Update firefox.sh

* Update tor-browser.sh

* Update podman-setup.sh

* Update global-theme.sh

* Update install-cups.sh

* Update install-epson-printer-drivers.sh

* chore: update copyright year (ChrisTitusTech#988)

* refact: minor fixes (ChrisTitusTech#971)

* Fix unused float handle mouse function, pub mod appstate

Fix unnecessary usage of pub mod for appstate and resolve unused float handle mouse function

* Resolve clippy warnings

Remove explicit lifetime for floatcontent impl. Use div_ceil instead of manually calculating the rows for hints

* Void (#1)

* service

* usb support for void

* revert

* Update common-service-script.sh

* Update system-update.sh

* fix bluez install

* Update samba-ssh-setup.sh

* Update samba-ssh-setup.sh

* sync with previous runit pr

* merge some fixes into solus (#2)

* chore: update copyright year (ChrisTitusTech#988)

* refact: minor fixes (ChrisTitusTech#971)

* Fix unused float handle mouse function, pub mod appstate

Fix unnecessary usage of pub mod for appstate and resolve unused float handle mouse function

* Resolve clippy warnings

Remove explicit lifetime for floatcontent impl. Use div_ceil instead of manually calculating the rows for hints

---------

Co-authored-by: Adam Perkowski <[email protected]>
Co-authored-by: Jeevitha Kannan K S <[email protected]>

* fixes (#3)

* chore: update copyright year (ChrisTitusTech#988)

* refact: minor fixes (ChrisTitusTech#971)

* Fix unused float handle mouse function, pub mod appstate

Fix unnecessary usage of pub mod for appstate and resolve unused float handle mouse function

* Resolve clippy warnings

Remove explicit lifetime for floatcontent impl. Use div_ceil instead of manually calculating the rows for hints

---------

Co-authored-by: Adam Perkowski <[email protected]>
Co-authored-by: Jeevitha Kannan K S <[email protected]>

* chore(release): prepare for 25.1.10 (ChrisTitusTech#991)

* Update linutil.yml (ChrisTitusTech#993)

* merge void to solus (#5)

* service

* usb support for void

* revert

* Update common-service-script.sh

* Update system-update.sh

* fix bluez install

* Update samba-ssh-setup.sh

* Update samba-ssh-setup.sh

* sync with previous runit pr

* merge (#4)

* chore: update copyright year (ChrisTitusTech#988)

* refact: minor fixes (ChrisTitusTech#971)

* Fix unused float handle mouse function, pub mod appstate

Fix unnecessary usage of pub mod for appstate and resolve unused float handle mouse function

* Resolve clippy warnings

Remove explicit lifetime for floatcontent impl. Use div_ceil instead of manually calculating the rows for hints

* chore(release): prepare for 25.1.10 (ChrisTitusTech#991)

* Update linutil.yml (ChrisTitusTech#993)

---------

Co-authored-by: Adam Perkowski <[email protected]>
Co-authored-by: Jeevitha Kannan K S <[email protected]>
Co-authored-by: Chris Titus <[email protected]>

---------

Co-authored-by: Adam Perkowski <[email protected]>
Co-authored-by: Jeevitha Kannan K S <[email protected]>
Co-authored-by: Chris Titus <[email protected]>

---------

Co-authored-by: Adam Perkowski <[email protected]>
Co-authored-by: Jeevitha Kannan K S <[email protected]>
Co-authored-by: Chris Titus <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants