@@ -36,7 +36,7 @@ impl<'f> File<'f> {
3636 language : & ' f FileFormat ,
3737 path : & ' f str ,
3838 chunks : Vec < Vec < Line < ' f > > > ,
39- ) -> File < ' f > {
39+ ) -> Self {
4040 File {
4141 language,
4242 path,
@@ -45,7 +45,7 @@ impl<'f> File<'f> {
4545 }
4646 }
4747
48- fn with_status ( language : & ' f FileFormat , path : & ' f str , status : Status ) -> File < ' f > {
48+ fn with_status ( language : & ' f FileFormat , path : & ' f str , status : Status ) -> Self {
4949 File {
5050 language,
5151 path,
@@ -201,7 +201,7 @@ struct Line<'l> {
201201}
202202
203203impl < ' l > Line < ' l > {
204- fn new ( lhs_number : Option < u32 > , rhs_number : Option < u32 > ) -> Line < ' l > {
204+ fn new ( lhs_number : Option < u32 > , rhs_number : Option < u32 > ) -> Self {
205205 Line {
206206 lhs : lhs_number. map ( Side :: new) ,
207207 rhs : rhs_number. map ( Side :: new) ,
@@ -216,7 +216,7 @@ struct Side<'s> {
216216}
217217
218218impl < ' s > Side < ' s > {
219- fn new ( line_number : u32 ) -> Side < ' s > {
219+ fn new ( line_number : u32 ) -> Self {
220220 Side {
221221 line_number,
222222 changes : Vec :: new ( ) ,
@@ -259,15 +259,15 @@ impl Highlight {
259259 } ;
260260
261261 match highlight {
262- TokenKind :: Delimiter => Highlight :: Delimiter ,
262+ TokenKind :: Delimiter => Self :: Delimiter ,
263263 TokenKind :: Atom ( atom) => match atom {
264- AtomKind :: String ( StringKind :: StringLiteral ) => Highlight :: String ,
265- AtomKind :: String ( StringKind :: Text ) => Highlight :: Normal ,
266- AtomKind :: Keyword => Highlight :: Keyword ,
267- AtomKind :: Comment => Highlight :: Comment ,
268- AtomKind :: Type => Highlight :: Type ,
269- AtomKind :: Normal => Highlight :: Normal ,
270- AtomKind :: TreeSitterError => Highlight :: TreeSitterError ,
264+ AtomKind :: String ( StringKind :: StringLiteral ) => Self :: String ,
265+ AtomKind :: String ( StringKind :: Text ) => Self :: Normal ,
266+ AtomKind :: Keyword => Self :: Keyword ,
267+ AtomKind :: Comment => Self :: Comment ,
268+ AtomKind :: Type => Self :: Type ,
269+ AtomKind :: Normal => Self :: Normal ,
270+ AtomKind :: TreeSitterError => Self :: TreeSitterError ,
271271 } ,
272272 }
273273 }
0 commit comments