mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-03-17 12:22:32 +00:00
Introduce the foundation for the new username system
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace DiscordChatExporter.Core.Utils.Extensions;
|
||||
|
||||
@@ -10,4 +11,7 @@ public static class GenericExtensions
|
||||
!predicate(value)
|
||||
? value
|
||||
: null;
|
||||
|
||||
public static T? NullIfDefault<T>(this T value) where T : struct =>
|
||||
value.NullIf(v => EqualityComparer<T>.Default.Equals(v, default));
|
||||
}
|
||||
Reference in New Issue
Block a user