Upgrade Rust toolchain to 1.83 (#14677)

This commit is contained in:
Micha Reiser 2024-11-29 13:05:05 +01:00 committed by GitHub
parent a6402fb51e
commit b63c2e126b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
63 changed files with 127 additions and 127 deletions

View file

@ -156,7 +156,7 @@ pub(crate) fn check(
.map(|(diagnostic, noqa_edit)| {
to_lsp_diagnostic(
diagnostic,
&noqa_edit,
noqa_edit,
&source_kind,
locator.to_index(),
encoding,
@ -234,7 +234,7 @@ pub(crate) fn fixes_for_diagnostics(
/// If the source kind is a text document, the cell index will always be `0`.
fn to_lsp_diagnostic(
diagnostic: Diagnostic,
noqa_edit: &Option<Edit>,
noqa_edit: Option<Edit>,
source_kind: &SourceKind,
index: &LineIndex,
encoding: PositionEncoding,
@ -261,9 +261,9 @@ fn to_lsp_diagnostic(
new_text: edit.content().unwrap_or_default().to_string(),
})
.collect();
let noqa_edit = noqa_edit.as_ref().map(|noqa_edit| lsp_types::TextEdit {
let noqa_edit = noqa_edit.map(|noqa_edit| lsp_types::TextEdit {
range: diagnostic_edit_range(noqa_edit.range(), source_kind, index, encoding),
new_text: noqa_edit.content().unwrap_or_default().to_string(),
new_text: noqa_edit.into_content().unwrap_or_default().into_string(),
});
serde_json::to_value(AssociatedDiagnosticData {
kind: kind.clone(),

View file

@ -26,7 +26,7 @@ pub(crate) struct Requester<'s> {
response_handlers: FxHashMap<lsp_server::RequestId, ResponseBuilder<'s>>,
}
impl<'s> Client<'s> {
impl Client<'_> {
pub(super) fn new(sender: ClientSender) -> Self {
Self {
notifier: Notifier(sender.clone()),

View file

@ -334,7 +334,7 @@ impl RuffSettingsIndex {
struct EditorConfigurationTransformer<'a>(&'a ResolvedEditorSettings, &'a Path);
impl<'a> ConfigurationTransformer for EditorConfigurationTransformer<'a> {
impl ConfigurationTransformer for EditorConfigurationTransformer<'_> {
fn transform(&self, filesystem_configuration: Configuration) -> Configuration {
let ResolvedEditorSettings {
configuration,