Skip to content

Commit

Permalink
Remove deprecated converters
Browse files Browse the repository at this point in the history
  • Loading branch information
Foso committed Dec 7, 2023
1 parent 0420ad8 commit eb5054a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ data class FunctionData(
)
.addStatement("typeInfo = typeInfo<%L>())\n", this.returnType.parameterType.toTypeName())
.addStatement(
"return %L.%L<${returnTypeName}, ${innerReturnType}>(%L,${extDataClass.objectName})%L",
"return %L.%L<${returnTypeName}>(%L,${extDataClass.objectName})%L",
converterHelper.objectName,
if (this.isSuspend) {
"suspendRequest"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ public class KtorfitConverterHelper(private val ktorfit: Ktorfit) {
/**
* This will handle all requests for functions without suspend modifier
*/
public fun <ReturnType, RequestType : Any?> request(
public fun <ReturnType> request(
returnTypeData: TypeData,
requestBuilder: HttpRequestBuilder.() -> Unit
): ReturnType? {

ktorfit.nextResponseConverter(null, returnTypeData)?.let { responseConverter ->
return responseConverter.convert {
suspendRequest<HttpResponse, HttpResponse>(
suspendRequest<HttpResponse>(
TypeData.createTypeData(
"io.ktor.client.statement.HttpResponse",
typeInfo<HttpResponse>()
Expand All @@ -54,7 +54,7 @@ public class KtorfitConverterHelper(private val ktorfit: Ktorfit) {
* This will handle all requests for functions with suspend modifier
* Used by generated Code
*/
public suspend fun <ReturnType, RequestType : Any?> suspendRequest(
public suspend fun <ReturnType> suspendRequest(
typeData: TypeData,
requestBuilder: HttpRequestBuilder.() -> Unit
): ReturnType? {
Expand Down

0 comments on commit eb5054a

Please sign in to comment.