pub struct Applied {
pub file: PathBuf,
pub line: usize,
pub rule: String,
pub applicability: Applicability,
pub pass: usize,
}Expand description
One fix that was (or would be) applied.
Reported even on a dry run, and even when a later pass reverted the file: what was applied is what the run did, and a reader who is told only what remains cannot tell a quiet run from a busy one that undid itself.
Fields§
§file: PathBufThe file as the caller named it — not the scratch path a dry run writes to.
line: usizeThe line the diagnostic was on, before this pass’s edits moved anything.
rule: StringThe rule the fix was filed under, which is what --rule and [fix] match on.
applicability: ApplicabilityThe class it was applied under. Unsafe here means the run was asked for it,
through --unsafe or [fix] unsafe.
pass: usizeWhich pass applied it, counted from 1. More than one means an edit could not land until an overlapping one had been applied and the file re-checked.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Applied
impl RefUnwindSafe for Applied
impl Send for Applied
impl Sync for Applied
impl Unpin for Applied
impl UnsafeUnpin for Applied
impl UnwindSafe for Applied
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more