-
-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
removed eager ext #120 #131
Conversation
Codecov Report
@@ Coverage Diff @@
## feature/128-multimodule #131 +/- ##
=============================================================
- Coverage 90.51% 90.29% -0.23%
Complexity 119 119
=============================================================
Files 41 41
Lines 369 340 -29
Branches 44 43 -1
=============================================================
- Hits 334 307 -27
+ Misses 10 9 -1
+ Partials 25 24 -1
Continue to review full report at Codecov.
|
@@ -17,3 +17,5 @@ fun Headers.asSequence(): Sequence<Header> = Sequence { | |||
} | |||
} | |||
} | |||
|
|||
typealias Header = Pair<String, String> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whats the problem to use old
data class Headers(...)
Even it can be destructed (watch next comment)
@@ -35,3 +35,9 @@ class HeadersExtKtTest { | |||
} | |||
} | |||
} | |||
|
|||
val Header.name | |||
get() = this.first |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we use plain data class (as was before) we can omit such extensions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
created #134 to implement this case
@@ -24,7 +24,7 @@ class LoggingInterceptor(private val log: (String) -> Unit = ::println) : Interc | |||
return chain.proceed(request).also { response -> | |||
log("${request.method()} ${response.code()} - ${System.currentTimeMillis() - startTime}ms ${request.url()}") | |||
|
|||
request.headers().asSequence().forEach { log("${it.name}: ${it.value}") } | |||
request.headers().asSequence().forEach { (name, value) ->log("$name: $value") } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Data class also can be destructed, it is not necessary to make it alias for 'Pair<String, String>'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the reason for it is Header
data class is also removed in this PR
No description provided.