Merge IncrementalEdit
and SourceEdit
#2532
Labels
refactoring
An internal refactoring of the codebase
IncrementalEdit
and SourceEdit
#2532
After #2527,
IncrementalEdit
andSourceEdit
are more or less equivalent types. Both store a replacement range and a replacement. The only meaningful difference is thatSourceEdit
hasString
as a replacement andIncrementalEdit
has an array of bytes as a replacement and can thus also represent invalid UTF-8. We should merge them, ideally into a type that is byte-based (because it’s more versatile) but that offersString
-based accessors.The best outcome would be if
SourceEdit
could be the type that’s used to represent the edits,IncrementalEdit
becomes a deprecatedtypealias
toSourceEdit
andSourceEdit
gains (possibly deprecated) members for all the members thatIncrementalEdit
had, for API compatibility.The text was updated successfully, but these errors were encountered: