Skip to content

Commit

Permalink
Remove unused return type.
Browse files Browse the repository at this point in the history
  • Loading branch information
koculu committed Nov 14, 2024
1 parent fcb8231 commit 807fe6a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
12 changes: 4 additions & 8 deletions src/ZoneTree.UnitTests/SafeBplusTreeTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,15 +148,13 @@ public void BTreeIteratorParallelInserts(BTreeLockMode lockMode)
{
var key = random.Next();
tree.AddOrUpdate(key,
AddOrUpdateResult (ref int value) =>
void (ref int value) =>
{
value = key + key;
return AddOrUpdateResult.ADDED;
},
AddOrUpdateResult (ref int value) =>
void (ref int value) =>
{
value = key + key;
return AddOrUpdateResult.UPDATED;
}, out _);
});
});
Expand Down Expand Up @@ -203,15 +201,13 @@ public void BTreeReverseIteratorParallelInserts(BTreeLockMode lockMode)
{
var key = random.Next();
tree.AddOrUpdate(key,
AddOrUpdateResult (ref int x) =>
void (ref int x) =>
{
x = key + key;
return AddOrUpdateResult.ADDED;
},
AddOrUpdateResult (ref int y) =>
void (ref int y) =>
{
y = key + key;
return AddOrUpdateResult.UPDATED;
}, out _);
});
});
Expand Down
4 changes: 2 additions & 2 deletions src/ZoneTree/Collections/BTree/BTree.Write.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ public bool TryInsert(in TKey key, in TValue value, out long opIndex)
}
}

public delegate AddOrUpdateResult AddDelegate(ref TValue value);
public delegate void AddDelegate(ref TValue value);

public delegate AddOrUpdateResult UpdateDelegate(ref TValue value);
public delegate void UpdateDelegate(ref TValue value);

public AddOrUpdateResult AddOrUpdate(
in TKey key,
Expand Down
6 changes: 2 additions & 4 deletions src/ZoneTree/Segments/InMemory/MutableSegment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -224,17 +224,15 @@ public AddOrUpdateResult Delete(in TKey key, out long opIndex)

var status = BTree
.AddOrUpdate(key,
AddOrUpdateResult (ref TValue x) =>
void (ref TValue x) =>
{
MarkValueDeleted(ref x);
insertedValue = x;
return AddOrUpdateResult.ADDED;
},
AddOrUpdateResult (ref TValue x) =>
void (ref TValue x) =>
{
MarkValueDeleted(ref x);
insertedValue = x;
return AddOrUpdateResult.UPDATED;
}, out opIndex);
WriteAheadLog.Append(in key, in insertedValue, opIndex);
return status;
Expand Down

0 comments on commit 807fe6a

Please sign in to comment.