mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 03:47:02 +02:00
in case of error return a range of chars position instead of one line and column
This commit is contained in:
parent
2c6d08c519
commit
9b24f83456
1 changed files with 3 additions and 7 deletions
|
@ -146,12 +146,8 @@ impl<'a> Display for Error<'a> {
|
|||
)?,
|
||||
ErrorKind::External(ref error) => writeln!(f, "{}", error)?,
|
||||
}
|
||||
write!(
|
||||
f,
|
||||
"{}:{} in `{}`.",
|
||||
self.context.location_line(),
|
||||
self.context.get_utf8_column(),
|
||||
self.context.extra,
|
||||
)
|
||||
let base_column = self.context.get_utf8_column();
|
||||
let size = self.context.fragment().chars().count();
|
||||
write!(f, "{}:{} in `{}`.", base_column, base_column + size, self.context.extra,)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue