Skip to content

Commit 6ba151a

Browse files
authored
Fix build
Avoid using ValueRef with older framework versions.
1 parent 1d0da1c commit 6ba151a

File tree

1 file changed

+4
-0
lines changed
  • bench/algorithm/lru

1 file changed

+4
-0
lines changed

bench/algorithm/lru/2.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,11 @@ public bool TryGet(TK key, out TV value)
5757
{
5858
if (_key_lookup.TryGetValue(key, out var node))
5959
{
60+
#if NET5_0_OR_GREATER
6061
value = node.ValueRef.Value;
62+
#else
63+
value = node.Value.Value;
64+
#endif
6165
_entries.Remove(node);
6266
_entries.AddLast(node);
6367
return true;

0 commit comments

Comments
 (0)