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:
Charlie Marsh 2023-08-23 18:25:39 -04:00 committed by GitHub
parent 19a87c220a
commit 39c6665ff9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 43 additions and 52 deletions

View file

@ -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),