diff --git a/DisCatSharp.Attributes/GlobalSuppressions.cs b/DisCatSharp.Attributes/GlobalSuppressions.cs new file mode 100644 index 0000000000..a054df6938 --- /dev/null +++ b/DisCatSharp.Attributes/GlobalSuppressions.cs @@ -0,0 +1,8 @@ +// This file is used by Code Analysis to maintain SuppressMessage +// attributes that are applied to this project. +// Project-level suppressions either have no target or are given +// a specific target and scoped to a namespace, type, member, etc. + +using System.Diagnostics.CodeAnalysis; + +[assembly: SuppressMessage("Style", "IDE0290:Use primary constructor", Justification = "", Scope = "member", Target = "~M:DisCatSharp.Attributes.FeatureDescriptionAttribute.#ctor(System.String)")] diff --git a/DisCatSharp/Entities/User/DiscordUser.cs b/DisCatSharp/Entities/User/DiscordUser.cs index ec65675735..30d3e96c87 100644 --- a/DisCatSharp/Entities/User/DiscordUser.cs +++ b/DisCatSharp/Entities/User/DiscordUser.cs @@ -566,11 +566,7 @@ public override string ToString() var o1 = e1 as object; var o2 = e2 as object; - return o1 is null && o2 is null - ? true - : o1 is null || o2 is null - ? false - : e1.Id == e2.Id; + return (o1 is null && o2 is null) || (o1 is not null && o2 is not null && e1.Id == e2.Id); } ///