clapboard icon indicating copy to clipboard operation
clapboard copied to clipboard

rustify

Open jarjk opened this issue 1 year ago • 1 comments

make code more rusty

  • listen to many clippy::pedantic lints
  • don't use tokio for simple, sync thread-spawning
  • don't use the whole toml crate, use basic-toml instead
  • use serde's derive feature
  • improve code readability

commits

  • refactor: pedantic clippy fixes
  • refactor: unasync
  • refactor: several
  • refactor: less immediate unwraps
  • refactor: cosmetics
  • chore: dependency updates
  • chore: version bump
  • refactor: use basic-toml instead of toml with a struct utilizing serde

jarjk avatar Mar 02 '25 19:03 jarjk

Thanks @JeromeSchmied for the PR! Unfortunately it seems like clapboard isn't behaving the same with these modifications. Specifically, the order in which history is displayed seems to be quite random. Prior to these changes, it was time based (more recent things at the top). I wonder if this has to do with the removal of IndexMap?

bjesus avatar May 04 '25 16:05 bjesus

Whoops, I'm extremely sorry! The source of the problem could indeed be the removal IndexMap. I'll revert the code to use IndexMap, but unfortunately I cannot really use a device with wayland atm, so would be happy to receive feedback, whether it was fixed or not. Otherwise I did not know this overall awesome tool should have worked like that, and tried my best not to change on the program functionally. (also, it might be a good idea to write some unit tests)

jarjk avatar May 13 '25 15:05 jarjk

indexmap is back.

jarjk avatar May 13 '25 15:05 jarjk

Thanks @JeromeSchmied , but now it sorts things alphabetically instead of by time.

bjesus avatar May 16 '25 14:05 bjesus

oh my! do you happen to have any idea why that is?

jarjk avatar May 16 '25 17:05 jarjk

I'm sorry @JeromeSchmied — I'm sure your intentions are great, but I honestly don't have the time to review PRs from users who aren't actually using clapboard and cannot test their own PRs. Appreciate your desire to help! Feel free to open a new PR if you can actually test your code and confirm it does not change the existing clapboard behavior.

bjesus avatar May 26 '25 11:05 bjesus