structs 5/9: Make Check::new call into() on the passed kind

This commit is contained in:
Martin Fischer 2023-01-06 23:00:33 +01:00 committed by Charlie Marsh
parent 54fb47ea6a
commit 3c8fdbf107
1 changed files with 2 additions and 2 deletions

View File

@ -1332,9 +1332,9 @@ pub struct Check {
}
impl Check {
pub fn new(kind: CheckKind, range: Range) -> Self {
pub fn new<K: Into<CheckKind>>(kind: K, range: Range) -> Self {
Self {
kind,
kind: kind.into(),
location: range.location,
end_location: range.end_location,
fix: None,