Skip to content

Commit

Permalink
chore: applies trivial suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
baywet authored Jan 21, 2025
1 parent f453306 commit 0e2dae7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion src/Kiota.Builder/Refiners/HttpRefiner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ private void AddPathParameters(CodeElement element)
// Retrieve all the parameters of kind CodeParameterKind.Custom
var customParameters = codeIndexer.Parameters
.Where(static param => param.IsOfKind(CodeParameterKind.Custom))
.ToList();
.ToArray();

// For each parameter:
foreach (var param in customParameters)
Expand Down
4 changes: 0 additions & 4 deletions src/Kiota.Builder/Writers/HTTP/CodeClassDeclarationWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,6 @@ private static void WriteUrlTemplate(CodeProperty urlTemplateProperty, LanguageW
/// <param name="writer">The language writer to write the path parameters to.</param>
private static void WritePathParameters(CodeProperty[] pathParameters, LanguageWriter writer)
{
if (pathParameters is null) return;

// Write each path parameter property
foreach (var pathParameter in pathParameters)
{
Expand All @@ -177,8 +175,6 @@ private static void WritePathParameters(CodeProperty[] pathParameters, LanguageW
/// <param name="writer">The language writer to write the query parameters to.</param>
private static void WriteQueryParameters(CodeProperty[] queryParameters, LanguageWriter writer)
{
if (queryParameters is null) return;

// Write each query parameter property
foreach (var queryParameter in queryParameters)
{
Expand Down

0 comments on commit 0e2dae7

Please sign in to comment.