File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -143,14 +143,15 @@ impl LineIndex {
143143 ///
144144 /// # Panics
145145 ///
146- /// If the offset is invalid.
146+ /// If the offset is invalid. See [`Self::try_line_col`].
147147 pub fn line_col ( & self , offset : TextSize ) -> LineCol {
148148 self . try_line_col ( offset) . expect ( "invalid offset" )
149149 }
150150
151- /// Transforms the `TextSize` into a `LineCol`, or returns `None` if the `offset` was invalid,
152- /// e.g. if it extends past the end of the text or points to the middle of a multi-byte
153- /// character.
151+ /// Transforms the `TextSize` into a `LineCol`.
152+ ///
153+ /// Returns `None` if the `offset` was invalid, e.g. if it extends past the end of the text or
154+ /// points to the middle of a multi-byte character.
154155 pub fn try_line_col ( & self , offset : TextSize ) -> Option < LineCol > {
155156 if offset > self . size {
156157 return None ;
You can’t perform that action at this time.
0 commit comments