aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Schneider <oli-obk@users.noreply.github.com>2017-05-09 17:08:26 +0200
committerGitHub <noreply@github.com>2017-05-09 17:08:26 +0200
commitcd733c7aff4468ff7a860dbc78ef20717e08b103 (patch)
tree1ae1dc044221a582d14357df09e29bc0576ce4f0
parentf7f426634368da6e872d260acf31fb664b727e05 (diff)
downloadmilf-rs-cd733c7aff4468ff7a860dbc78ef20717e08b103.tar.gz
milf-rs-cd733c7aff4468ff7a860dbc78ef20717e08b103.zip
Document that line/col indices are 0 based
-rw-r--r--src/de.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/de.rs b/src/de.rs
index 75129ed..bd73649 100644
--- a/src/de.rs
+++ b/src/de.rs
@@ -1064,6 +1064,8 @@ impl<'a> Deserializer<'a> {
impl Error {
/// Produces a (line, column) pair of the position of the error if available
+ ///
+ /// All indexes are 0-based.
pub fn line_col(&self) -> Option<(usize, usize)> {
self.inner.line.map(|line| (line, self.inner.col))
}