mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-01 06:11:21 +00:00
Remove remaining usage of set_fix_from_edit
(#6827)
This method is deprecated; we have one last usage, so removing it.
This commit is contained in:
parent
19a87c220a
commit
39c6665ff9
6 changed files with 43 additions and 52 deletions
|
@ -41,14 +41,6 @@ impl Diagnostic {
|
|||
self.fix = Some(fix);
|
||||
}
|
||||
|
||||
/// Set the [`Fix`] used to fix the diagnostic.
|
||||
#[inline]
|
||||
#[deprecated(note = "Use `Diagnostic::set_fix` instead.")]
|
||||
#[allow(deprecated)]
|
||||
pub fn set_fix_from_edit(&mut self, edit: Edit) {
|
||||
self.fix = Some(Fix::unspecified(edit));
|
||||
}
|
||||
|
||||
/// Consumes `self` and returns a new `Diagnostic` with the given `fix`.
|
||||
#[inline]
|
||||
#[must_use]
|
||||
|
@ -60,7 +52,6 @@ impl Diagnostic {
|
|||
/// Set the [`Fix`] used to fix the diagnostic, if the provided function returns `Ok`.
|
||||
/// Otherwise, log the error.
|
||||
#[inline]
|
||||
#[allow(deprecated)]
|
||||
pub fn try_set_fix(&mut self, func: impl FnOnce() -> Result<Fix>) {
|
||||
match func() {
|
||||
Ok(fix) => self.fix = Some(fix),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue