mirror of
https://github.com/astral-sh/ruff
synced 2026-01-21 21:40:51 -05:00
Impl Default for SourceLocation (#4328)
Co-authored-by: Micha Reiser <micha@reiser.io>
This commit is contained in:
@@ -225,6 +225,15 @@ pub struct SourceLocation {
|
||||
pub column: OneIndexed,
|
||||
}
|
||||
|
||||
impl Default for SourceLocation {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
row: OneIndexed::MIN,
|
||||
column: OneIndexed::MIN,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Debug for SourceLocation {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
f.debug_struct("SourceLocation")
|
||||
|
||||
Reference in New Issue
Block a user