Skip to content

Commit

Permalink
refactor: silence some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
anna-is-cute committed Mar 11, 2024
1 parent 797e2cd commit 04ef6b0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions DownloadTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -945,6 +945,11 @@ private async Task ConstructGroups(IDownloadTask_GetVersion info) {
try {
var text = await FileHelper.ReadAllTextAsync(existing);
var group = JsonConvert.DeserializeObject<ModGroup>(text);
if (group == null) {
Plugin.Log.Warning("Could not deserialise old group (was null)");
continue;
}

oldGroups.Add(group);
} catch (Exception ex) {
Plugin.Log.Warning(ex, "Could not deserialise old group");
Expand Down
2 changes: 2 additions & 0 deletions Util/DependencyHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ internal static async Task<bool> CheckDependencies(Plugin plugin) {
}
}

#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.

[Serializable]
[JsonObject(NamingStrategyType = typeof(CamelCaseNamingStrategy))]
internal class DependencyInfo {
Expand Down

0 comments on commit 04ef6b0

Please sign in to comment.