Skip to content

Commit f15f6f3

Browse files
committed
fix test
1 parent 2999352 commit f15f6f3

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/mcp/tools.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,6 @@ fn slice_file_content(
126126
if end == 0 {
127127
return Err("end_line must be >= 1".to_string());
128128
}
129-
if end < start {
130-
return Err("end_line must be >= start_line".to_string());
131-
}
132129
if total_line_count == 0 {
133130
return Err("cannot request line snippets from an empty file".to_string());
134131
}
@@ -138,6 +135,9 @@ fn slice_file_content(
138135
start, total_line_count
139136
));
140137
}
138+
if end < start {
139+
return Err("end_line must be >= start_line".to_string());
140+
}
141141

142142
let bounded_end = end.min(total_line_count as u32);
143143
let start_idx = (start - 1) as usize;

0 commit comments

Comments
 (0)