remove redundant code

This commit is contained in:
cvium 2021-05-04 19:57:03 +02:00
parent c0feb3694b
commit ad3e835bcf
2 changed files with 2 additions and 9 deletions

View File

@ -86,13 +86,6 @@ namespace MediaBrowser.Common.Extensions
return true;
}
if (index < span.Length - 1 && span[index] == _separator)
{
Current = span.Slice(0, index);
_str = span[(index + 1)..];
return true;
}
Current = span.Slice(0, index);
_str = span[(index + 1)..];
return true;

View File

@ -96,7 +96,7 @@ namespace Jellyfin.Server.Implementations.Tests.Data
[MemberData(nameof(ItemImageInfoFromValueString_Valid_TestData))]
public void ItemImageInfoFromValueString_Valid_Success(string value, ItemImageInfo expected)
{
var result = _sqliteItemRepository.ItemImageInfoFromValueString(value.AsSpan());
var result = _sqliteItemRepository.ItemImageInfoFromValueString(value);
Assert.Equal(expected.Path, result.Path);
Assert.Equal(expected.Type, result.Type);
Assert.Equal(expected.DateModified, result.DateModified);
@ -111,7 +111,7 @@ namespace Jellyfin.Server.Implementations.Tests.Data
[InlineData("https://image.tmdb.org/t/p/original/zhB5CHEgqqh4wnEqDNJLfWXJlcL.jpg*0")]
public void ItemImageInfoFromValueString_Invalid_Null(string value)
{
Assert.Null(_sqliteItemRepository.ItemImageInfoFromValueString(value.AsSpan()));
Assert.Null(_sqliteItemRepository.ItemImageInfoFromValueString(value));
}
public static IEnumerable<object[]> DeserializeImages_Valid_TestData()