add enum containing all successful route returns #614

병합
igalic refactor/route-result 에서 master 로 10 commits 를 머지했습니다 5 년 전
igalic 코멘트됨, 5 년 전 (Migrated from github.com)

This enum derives Responder, so it can be used as route result.
We also implement From, so it can be converted

This pr addresses #613

This enum derives `Responder`, so it can be used as route result. We also implement `From`, so it can be converted This pr addresses #613
codecov[bot] 코멘트됨, 5 년 전 (Migrated from github.com)

Codecov Report

Merging #614 into master will not change coverage.
The diff coverage is 0%.

@@           Coverage Diff           @@
##           master     #614   +/-   ##
=======================================
  Coverage   35.31%   35.31%           
=======================================
  Files          68       68           
  Lines        7907     7907           
  Branches     1893     1893           
=======================================
  Hits         2792     2792           
  Misses       4345     4345           
  Partials      770      770
# [Codecov](https://codecov.io/gh/Plume-org/Plume/pull/614?src=pr&el=h1) Report > Merging [#614](https://codecov.io/gh/Plume-org/Plume/pull/614?src=pr&el=desc) into [master](https://codecov.io/gh/Plume-org/Plume/commit/4b205fa995a6935a2512a9725d84635e889db48e?src=pr&el=desc) will **not change** coverage. > The diff coverage is `0%`. ```diff @@ Coverage Diff @@ ## master #614 +/- ## ======================================= Coverage 35.31% 35.31% ======================================= Files 68 68 Lines 7907 7907 Branches 1893 1893 ======================================= Hits 2792 2792 Misses 4345 4345 Partials 770 770 ```
igalic 코멘트됨, 5 년 전 (Migrated from github.com)

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

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
rfwatson (Migrated from github.com) 검토됨 5 년 전
rfwatson (Migrated from github.com) 코멘트됨, 5 년 전

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.

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.
trinity-1686a 검토됨 5 년 전
trinity-1686a left a comment
소유자

👍

:+1:
trinity-1686a 코멘트됨, 5 년 전
소유자

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)

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](https://api.rocket.rs/v0.4/rocket/http/uri/struct.Origin.html) 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)
igalic (Migrated from github.com) 검토됨 5 년 전
igalic (Migrated from github.com) 코멘트됨, 5 년 전

do you have a suggestion for improvement?

do you have a suggestion for improvement?
trinity-1686a 검토됨 5 년 전
trinity-1686a 코멘트됨, 5 년 전
소유자

I do but I don't know how to explain it with words, so I'll probably do it myself during the week end

I do but I don't know how to explain it with words, so I'll probably do it myself during the week end
trinity-1686a 이 변경사항을 승인하였습니다. 5 년 전
igalic (Migrated from github.com) 검토됨 5 년 전
igalic (Migrated from github.com) 코멘트됨, 5 년 전

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.

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.

리뷰어

trinity-1686a 이 변경사항을 승인하였습니다. 5 년 전
The pull request has been merged as 3d27e283ad.
You can also view command line instructions.

Step 1:

From your project repository, check out a new branch and test the changes.
git checkout -b refactor/route-result master
git pull origin refactor/route-result

Step 2:

Merge the changes and update on Forgejo.
git checkout master
git merge --no-ff refactor/route-result
git push origin master
로그인하여 이 대화에 참여
No reviewers
마일스톤 없음
담당자 없음
참여자 2명
알림
마감일
기한이 올바르지 않거나 범위를 벗어났습니다. 'yyyy-mm-dd'형식을 사용해주십시오.

마감일이 설정되지 않았습니다.

의존성

No dependencies set.

Reference: Plume/Plume#614
불러오는 중...
아직 콘텐츠가 없습니다.