From ef269073cd238a3cbdcce238645f5f8fc42b02c8 Mon Sep 17 00:00:00 2001 From: s2quake Date: Fri, 27 Dec 2024 09:40:11 +0900 Subject: [PATCH] chore: Remove nullable-related warnings --- src/Libplanet.Common/FixedSizedQueue.cs | 2 +- src/Libplanet.Store/BlockSet.cs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Libplanet.Common/FixedSizedQueue.cs b/src/Libplanet.Common/FixedSizedQueue.cs index 16c993a7ea9..9b7e5ae1253 100644 --- a/src/Libplanet.Common/FixedSizedQueue.cs +++ b/src/Libplanet.Common/FixedSizedQueue.cs @@ -46,7 +46,7 @@ public FixedSizedQueue(int size) while (Count > Size) { // Ensure we don't exceed the maximum size. - TryDequeue(out T _); + TryDequeue(out T? _); } } } diff --git a/src/Libplanet.Store/BlockSet.cs b/src/Libplanet.Store/BlockSet.cs index 59b45b83673..e67c4644743 100644 --- a/src/Libplanet.Store/BlockSet.cs +++ b/src/Libplanet.Store/BlockSet.cs @@ -4,7 +4,6 @@ using System.Linq; using BitFaster.Caching; using BitFaster.Caching.Lru; -using Caching; using Libplanet.Types.Blocks; namespace Libplanet.Store @@ -157,7 +156,7 @@ public IEnumerator> GetEnumerator() private Block? GetBlock(BlockHash key) { - if (_cache.TryGet(key, out Block cached)) + if (_cache.TryGet(key, out Block? cached)) { if (_store.ContainsBlock(key)) {