mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-23 02:27:40 +08: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…
Reference in New Issue
Block a user