From 27d680f5268fcfe4c06075999d2a4925d981bf25 Mon Sep 17 00:00:00 2001 From: solarin Date: Mon, 6 Apr 2020 11:15:43 +0400 Subject: [PATCH] remove unnecessary list usage --- TLSharp.Core/TelegramClient.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/TLSharp.Core/TelegramClient.cs b/TLSharp.Core/TelegramClient.cs index 57df77e..f683279 100644 --- a/TLSharp.Core/TelegramClient.cs +++ b/TLSharp.Core/TelegramClient.cs @@ -581,8 +581,7 @@ namespace TLSharp.Core int total = 0; int found = stIdx < 0 ? 0 : stIdx; pageSize = pageSize < 0 ? DEFAULT_PAGE_SIZE : pageSize; - - List results = new List(); + TLChannelParticipants ret = new TLChannelParticipants(); ret.Participants = new TLVector(); ret.Users = new TLVector(); @@ -603,7 +602,6 @@ namespace TLSharp.Core var fchat = await SendRequestAsync(req, token).ConfigureAwait(false); total = fchat.Count; found += fchat.Participants.Count; - results.Add(fchat); foreach (var p in fchat.Participants) ret.Participants.Add(p); foreach (var u in fchat.Users)