(source T)
| 866 | } |
| 867 | |
| 868 | func cloneRawMap[T ~map[string]json.RawMessage](source T) map[string]json.RawMessage { |
| 869 | if len(source) == 0 { |
| 870 | return nil |
| 871 | } |
| 872 | cloned := make(map[string]json.RawMessage, len(source)) |
| 873 | for key, value := range source { |
| 874 | cloned[key] = cloneRawMessage(value) |
| 875 | } |
| 876 | return cloned |
| 877 | } |
| 878 | |
| 879 | func cloneProofPtr(source *network.Proof) map[string]json.RawMessage { |
| 880 | if source == nil { |
no test coverage detected