Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🚩 연관 이슈
close #948
📝 작업 내용
🏞️ 스크린샷 (선택)
🗣️ 리뷰 요구사항 (선택)
suspendOnXXX()
랑onXXX()
함수가 두개씩 있는게 유지보수성과 가독성이 좋지 않은 것 같아서코틀린의
Result
의onXXX()
는 어떻게 구현되어있는지 찾아봤어요.그런데
suspend
처리에 관련된 로직은 안보이고 그냥inline
키워드가 붙어있더라구요 ..람다가 호출한 쪽에
inline
되는 거면 호출한 쪽의 컨텍스트에 따라suspend
함수를 호출할 수 있으니suspendOnXXX()
를 굳이 만들 필요가 없었어요!추가적으로
ApiResultExtensions
에서suspend
붙은 함수들 모두 적용했습니다.호출하는 쪽에서
suspend
인지 아닌지에 따라 호출할 함수를 결정하는 건 좋지 못한 방식인 것 같아서요 ...넘 간단하게 해결해서 기분 좋음 ㅎ