fix some compiler warnings

This commit is contained in:
13xforever 2020-10-07 14:30:29 +05:00
parent c6fac43217
commit dc6b3129bc
3 changed files with 3 additions and 6 deletions

View File

@ -51,8 +51,8 @@ namespace CompatBot.Commands
{
try
{
var prInfo = githubClient.GetPrInfoAsync(pr, Config.Cts.Token).GetAwaiter().GetResult();
CachedUpdateInfo = client.GetUpdateAsync(Config.Cts.Token, prInfo?.MergeCommitSha).GetAwaiter().GetResult();
var prInfo = githubClient.GetPrInfoAsync(pr, Config.Cts.Token).ConfigureAwait(false).GetAwaiter().GetResult();
CachedUpdateInfo = client.GetUpdateAsync(Config.Cts.Token, prInfo?.MergeCommitSha).ConfigureAwait(false).GetAwaiter().GetResult();
if (CachedUpdateInfo?.CurrentBuild != null)
{
CachedUpdateInfo.LatestBuild = CachedUpdateInfo.CurrentBuild;

View File

@ -153,7 +153,6 @@ namespace CompatBot.Commands
{
var analyzer = new ColorThief();
List<Color> palette = new List<Color>(objects.Count);
var dcc = 0;
foreach (var obj in objects)
{
var r = obj.Rectangle;
@ -234,8 +233,6 @@ namespace CompatBot.Commands
var textBox = TextMeasurer.Measure(label, textRendererOptions);
#if LABELS_INSIDE
var textHeightScale = (int)Math.Ceiling(textBox.Width / Math.Min(img.Width - r.X - 10 - 4 * scale, r.W - 4 * scale));
#else
var textHeightScale = 1;
#endif
// object bounding box
try

View File

@ -127,7 +127,7 @@ namespace CompatBot.EventHandlers.LogParsing.SourceHandlers
if (result.Status != DownloadStatus.Completed)
Config.Log.Error(result.Exception, "Failed to download file from Google Drive: " + result.Status);
await pipe.Writer.FlushAsync(cancellationToken).ConfigureAwait(false);
pipe.Writer.Complete();
await pipe.Writer.CompleteAsync().ConfigureAwait(false);
await pipingTask.ConfigureAwait(false);
}
catch (Exception e)