Skip to content

Commit

Permalink
merge from the DryIoc v6
Browse files Browse the repository at this point in the history
  • Loading branch information
dadhi committed Jun 20, 2022
1 parent c29a045 commit ae7a787
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/ImTools/ImTools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2108,7 +2108,6 @@ internal virtual StringBuilder ToMermaidString(StringBuilder s) =>
/// otherwise the result. Returns the Entry with the `hash` though it may be a `HashConflictingEntry`</summary>
internal virtual Entry GetSurePresentEntry(int hash) => throw new InvalidOperationException("The sure present hash does not exist in the empty map");

// todo: @wip remove hash from here for simplicity
/// <summary>Returns the found entry with the same hash or the new map with added new entry.
/// Note that the empty map will return the entry the same as if the entry was found - so the consumer should check for the empty map.
/// Note that the method cannot return the `null` - when the existing entry is not found it will always be the new map with the added entry.</summary>
Expand Down Expand Up @@ -5877,7 +5876,7 @@ public static ImHashMap<K, V> AddOrUpdate<K, V>(this ImHashMap<K, V> map, K key,
[MethodImpl((MethodImplOptions)256)]
public static ImHashMap<K, V> AddOrUpdateByReferenceEquals<K, V>(this ImHashMap<K, V> map, K key, V value) =>
map.AddOrUpdateEntryByReferenceEquals(EntryWithHash(key, value));

// todo: @feature we need and Add method to throw for the existing key, maybe based on GetOrAdd
/// <summary>Add sure not present item, so before calling this method you may either check the map via GetEntryOrNull or be sure that the new added key is unique</summary>
[MethodImpl((MethodImplOptions)256)]
public static ImHashMap<K, V> AddSureNotPresentEntry<K, V>(this ImHashMap<K, V> map, ImHashMapEntry<K, V> newEntry) =>
Expand Down Expand Up @@ -6389,7 +6388,6 @@ public bool MoveNext()
void IDisposable.Dispose() { }
}

// todo: @wip for the ImHashMap<int, V>
/// <summary>Do something for each entry.
/// The `parents` parameter allows to reuse the stack memory used for the traversal between multiple calls.
/// So you may pass the empty `parents` into the first `Enumerate` and then keep passing the same `parents` into the subsequent calls</summary>
Expand Down

0 comments on commit ae7a787

Please sign in to comment.