kworkflow / patch-hub

patch-hub is a TUI that streamlines the interaction of Linux developers with patches archived on lore.kernel.org
GNU General Public License v2.0
7 stars 6 forks source link

refactor: use idiomatic `TryFrom` rather than `from_integer` #56

Closed OJarrisonn closed 4 weeks ago

OJarrisonn commented 1 month ago

Changing the method EditableConfig::from_integer to use the idiomatic TryFrom trait.

Since from_integer is a fallible convertion function, it's more appropriate to use TryFrom<usize>

Also notice that the previous name says integer but receives an usize

davidbtadokoro commented 4 weeks ago

Hi again, @OJarrisonn, and thank you for this PR. Once more, a great and to the point change. Merged into the unstable branch with only some adaptations to the commit message.