mirror of https://github.com/astral-sh/ruff
structs 5/9: Make Check::new call into() on the passed kind
This commit is contained in:
parent
54fb47ea6a
commit
3c8fdbf107
|
|
@ -1332,9 +1332,9 @@ pub struct Check {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Check {
|
impl Check {
|
||||||
pub fn new(kind: CheckKind, range: Range) -> Self {
|
pub fn new<K: Into<CheckKind>>(kind: K, range: Range) -> Self {
|
||||||
Self {
|
Self {
|
||||||
kind,
|
kind: kind.into(),
|
||||||
location: range.location,
|
location: range.location,
|
||||||
end_location: range.end_location,
|
end_location: range.end_location,
|
||||||
fix: None,
|
fix: None,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue