File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ pub(crate) fn parse_file(s: &str) -> (PathBuf, Position) {
129
129
///
130
130
/// Does not validate if file.rs is a file or directory.
131
131
fn split_path_row_col ( s : & str ) -> Option < ( PathBuf , Position ) > {
132
- let mut s = s. rsplitn ( 3 , ':' ) ;
132
+ let mut s = s. trim_end_matches ( ':' ) . rsplitn ( 3 , ':' ) ;
133
133
let col: usize = s. next ( ) ?. parse ( ) . ok ( ) ?;
134
134
let row: usize = s. next ( ) ?. parse ( ) . ok ( ) ?;
135
135
let path = s. next ( ) ?. into ( ) ;
@@ -141,7 +141,7 @@ fn split_path_row_col(s: &str) -> Option<(PathBuf, Position)> {
141
141
///
142
142
/// Does not validate if file.rs is a file or directory.
143
143
fn split_path_row ( s : & str ) -> Option < ( PathBuf , Position ) > {
144
- let ( path, row) = s. rsplit_once ( ':' ) ?;
144
+ let ( path, row) = s. trim_end_matches ( ':' ) . rsplit_once ( ':' ) ?;
145
145
let row: usize = row. parse ( ) . ok ( ) ?;
146
146
let path = path. into ( ) ;
147
147
let pos = Position :: new ( row. saturating_sub ( 1 ) , 0 ) ;
You can’t perform that action at this time.
0 commit comments