Skip to content

Commit 0a739fb

Browse files
authored
Use Task.CompletedTask (#789)
1 parent 341580f commit 0a739fb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/KubernetesClient/Autorest/BasicAuthenticationCredentials.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public override Task ProcessHttpRequestAsync(
4949
"{0}:{1}",
5050
UserName,
5151
Password).ToCharArray())));
52-
return Task.FromResult<object>(null);
52+
return Task.CompletedTask;
5353
}
5454
}
5555
}

src/KubernetesClient/Autorest/ServiceClientCredentials.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public abstract class ServiceClientCredentials
2323
public virtual Task ProcessHttpRequestAsync(HttpRequestMessage request, CancellationToken cancellationToken)
2424
{
2525
// Return an empty task by default
26-
return Task.FromResult<object>(null);
26+
return Task.CompletedTask;
2727
}
2828
}
2929
}

0 commit comments

Comments
 (0)