mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-24 13:40:31 +01: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
@ -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…
x
Reference in New Issue
Block a user