There was an error while loading. Please reload this page.
1 parent 4b6aedc commit 8a53197Copy full SHA for 8a53197
1 file changed
crates/ranges-ext/src/lib.rs
@@ -105,7 +105,7 @@ pub trait VecOp<T: RangeOp>: Send + 'static {
105
// 检查是否有重叠: new.start < existing.end && new.end > existing.start
106
if new_range.start < existing_range.end && new_range.end > existing_range.start {
107
// 有重叠,检查是否可覆盖
108
- if !existing.overwritable(&item) {
+ if !(existing.overwritable(&item) || existing.mergeable(&item)) {
109
// 不可覆盖,返回冲突错误
110
return Err(RangeError::Conflict {
111
new: item,
0 commit comments