Fix unnecessary-mut-passed lint (#36490)

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2025-08-19 16:20:01 +02:00 committed by GitHub
parent e3b593efbd
commit c4083b9b63
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 103 additions and 104 deletions

View file

@ -655,11 +655,11 @@ pub fn show_link_definition(
pub(crate) fn find_url(
buffer: &Entity<language::Buffer>,
position: text::Anchor,
mut cx: AsyncWindowContext,
cx: AsyncWindowContext,
) -> Option<(Range<text::Anchor>, String)> {
const LIMIT: usize = 2048;
let Ok(snapshot) = buffer.read_with(&mut cx, |buffer, _| buffer.snapshot()) else {
let Ok(snapshot) = buffer.read_with(&cx, |buffer, _| buffer.snapshot()) else {
return None;
};
@ -717,11 +717,11 @@ pub(crate) fn find_url(
pub(crate) fn find_url_from_range(
buffer: &Entity<language::Buffer>,
range: Range<text::Anchor>,
mut cx: AsyncWindowContext,
cx: AsyncWindowContext,
) -> Option<String> {
const LIMIT: usize = 2048;
let Ok(snapshot) = buffer.read_with(&mut cx, |buffer, _| buffer.snapshot()) else {
let Ok(snapshot) = buffer.read_with(&cx, |buffer, _| buffer.snapshot()) else {
return None;
};