mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-03 18:28:24 +00:00
Upgrade Rust toolchain to 1.83 (#14677)
This commit is contained in:
parent
a6402fb51e
commit
b63c2e126b
63 changed files with 127 additions and 127 deletions
|
@ -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(),
|
||||
|
|
|
@ -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()),
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue