Another batch of lint fixes (#36521)

- **Enable a bunch of extra lints**
- **First batch of fixes**
- **More fixes**

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2025-08-19 22:33:44 +02:00 committed by GitHub
parent 69b1c6d6f5
commit 6825715503
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
147 changed files with 788 additions and 1042 deletions

View file

@ -55,10 +55,10 @@ use workspace::Workspace;
use workspace::notifications::{ErrorMessagePrompt, NotificationId};
use worktree::Worktree;
const CURSOR_MARKER: &'static str = "<|user_cursor_is_here|>";
const START_OF_FILE_MARKER: &'static str = "<|start_of_file|>";
const EDITABLE_REGION_START_MARKER: &'static str = "<|editable_region_start|>";
const EDITABLE_REGION_END_MARKER: &'static str = "<|editable_region_end|>";
const CURSOR_MARKER: &str = "<|user_cursor_is_here|>";
const START_OF_FILE_MARKER: &str = "<|start_of_file|>";
const EDITABLE_REGION_START_MARKER: &str = "<|editable_region_start|>";
const EDITABLE_REGION_END_MARKER: &str = "<|editable_region_end|>";
const BUFFER_CHANGE_GROUPING_INTERVAL: Duration = Duration::from_secs(1);
const ZED_PREDICT_DATA_COLLECTION_CHOICE: &str = "zed_predict_data_collection_choice";
@ -166,7 +166,7 @@ fn interpolate(
) -> Option<Vec<(Range<Anchor>, String)>> {
let mut edits = Vec::new();
let mut model_edits = current_edits.into_iter().peekable();
let mut model_edits = current_edits.iter().peekable();
for user_edit in new_snapshot.edits_since::<usize>(&old_snapshot.version) {
while let Some((model_old_range, _)) = model_edits.peek() {
let model_old_range = model_old_range.to_offset(old_snapshot);
@ -2123,7 +2123,7 @@ mod tests {
let completion = completion_task.await.unwrap().unwrap();
completion
.edits
.into_iter()
.iter()
.map(|(old_range, new_text)| (old_range.to_point(&snapshot), new_text.clone()))
.collect::<Vec<_>>()
}