ystero-dev / hampi

Rust ASN.1 Toolkit
Other
44 stars 17 forks source link

Use anyhow #84 #121

Closed Its-Just-Nans closed 4 months ago

Its-Just-Nans commented 4 months ago

use anyhow for #84

https://github.com/ast-grep/ast-grep helped a lot :

sg -p 'Err($A)' -l rs -r 'Err($A.into())' -i

Note that there are some clippy fix like .first() instead of .get(0)

This is more like a draft, happy to have a feedback

gabhijit commented 4 months ago

Thank you for the pull request!! This was pending for a while.

The changes look good. Can you please squash these into a single commit and then we can merge this.

Also, you might have to rebase with upstream master first.

Its-Just-Nans commented 4 months ago

I think it's okay now

btw you can just squash with github ^^

image

gabhijit commented 4 months ago

I think it's okay now

btw you can just squash with github ^^

image

Oh I didn't know that. My usual flow is - when the branch is ready -

  1. git fetch origin
  2. get rebase -i origin/master
  3. select the commits that you want to squash into one
  4. Edit the final commit message
  5. git push --force origin/my-branch

This way the git log history is clean and only a few relevant commits are kept.

That's a bit cutomized so cannot be trivially done on GH UI.

I have used that for now. Guess this works fine for a couple of small commits etc.

Thank you for your contributions!