We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2999352 commit f15f6f3Copy full SHA for f15f6f3
1 file changed
src/mcp/tools.rs
@@ -126,9 +126,6 @@ fn slice_file_content(
126
if end == 0 {
127
return Err("end_line must be >= 1".to_string());
128
}
129
- if end < start {
130
- return Err("end_line must be >= start_line".to_string());
131
- }
132
if total_line_count == 0 {
133
return Err("cannot request line snippets from an empty file".to_string());
134
@@ -138,6 +135,9 @@ fn slice_file_content(
138
135
start, total_line_count
139
136
));
140
137
+ if end < start {
+ return Err("end_line must be >= start_line".to_string());
+ }
141
142
let bounded_end = end.min(total_line_count as u32);
143
let start_idx = (start - 1) as usize;
0 commit comments