mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-16 07:12:18 +01:00
Merge pull request #848 from Bond-009/perf
Minor changes to reduce allocations
This commit is contained in:
@@ -168,9 +168,9 @@ namespace Emby.Server.Implementations.Library
|
||||
/// <exception cref="ArgumentNullException"></exception>
|
||||
public User GetUserById(Guid id)
|
||||
{
|
||||
if (id.Equals(Guid.Empty))
|
||||
if (id == Guid.Empty)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(id));
|
||||
throw new ArgumentException(nameof(id), "Guid can't be empty");
|
||||
}
|
||||
|
||||
return Users.FirstOrDefault(u => u.Id == id);
|
||||
|
||||
Reference in New Issue
Block a user