mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-05-05 13:36:30 +03:00
Use Result.Success property instead of Result.FromSuccess() (#283)
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
parent
309d900067
commit
a80debf1b1
18 changed files with 59 additions and 54 deletions
|
@ -32,7 +32,7 @@ public static class CollectionExtensions
|
|||
{
|
||||
return list.Count switch
|
||||
{
|
||||
0 => Result.FromSuccess(),
|
||||
0 => Result.Success,
|
||||
1 => list[0],
|
||||
_ => new AggregateError(list.Cast<IResult>().ToArray())
|
||||
};
|
||||
|
|
|
@ -22,7 +22,7 @@ public static class GuildScheduledEventExtensions
|
|||
}
|
||||
|
||||
return scheduledEvent.ScheduledEndTime.AsOptional().IsDefined(out endTime)
|
||||
? Result.FromSuccess()
|
||||
? Result.Success
|
||||
: new ArgumentNullError(nameof(scheduledEvent.ScheduledEndTime));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue