mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-16 09:35:07 +00:00
Impl Default
for SourceLocation
(#4328)
Co-authored-by: Micha Reiser <micha@reiser.io>
This commit is contained in:
parent
fa26860296
commit
badade3ccc
4 changed files with 15 additions and 15 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue