ajmalsiddiqui / ajmalsiddiqui/levenshtein-diff

`generate_edits` API can be reworked to avoid `Result`

Aperta
#4 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Rust
Stelle
8
Fork
3
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

The `generate_edits` function currently only returns an `Err` if the matrix passed in is incorrect in some way. In my opinion, it makes much more sense to remove that parameter, call `distance` internally, and return only the `Vec>`.

The downside of doing it this way is that the user can no longer select which version of the levenshtein functions they use. However, I don't see that as a major downside compared to simplifying the API.

I'm willing to write a PR for this if you agree with the idea.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.