add enum containing all successful route returns
#614
Zusammengeführt
igalic
hat 10 Commits von refactor/route-result
nach master
vor 5 Jahren zusammengeführt
Laden…
In neuem Issue referenzieren
Hier gibt es bis jetzt noch keinen Inhalt.
Branch „refactor/route-result“ löschen
Das Löschen eines Branches ist permanent. Es KANN NICHT rückgängig gemacht werden. Fortfahren?
This enum derives
Responder
, so it can be used as route result.We also implement
From
, so it can be convertedThis pr addresses #613
Codecov Report
I've marked this pull request now ready for review.
even though there's at least one function left that could be improved (in readability, or at least refractored to use this enum)
but i don't think we can make further strides without improving our ErrorPage
So if I read this correctly, the Rust compiler infers the type from the return type of the function, allowing
into()
to function as expected?Even though I should probably expect that from Rust, that's still pretty neat.
👍
Isn't it a bit strange that when redirecting to invalid uri, it gives an error? It would probably make more sens that the chain on line 100 does the parsing to, and default to
parse("/").unwrap()
. Also it should probably be a Origin to block redirection to other domain(this is also true for previous code, it's pretty old, I'm pretty sure we did not do code review last September)
do you have a suggestion for improvement?
I do but I don't know how to explain it with words, so I'll probably do it myself during the week end
well, I'll be happy to review it then, and help with words where necessary
i used to be quite good with words, now i'm procrastinating on writing words, by working on a blogging platform.
Reviewer
3d27e283ad
gemergt.Schritt 1:
Wechsle auf einen neuen Branch in deinem lokalen Repository und teste die Änderungen.Schritt 2:
Führe die Änderungen zusammen und aktualisiere den Stand online auf Forgejo.