Commit a9c7768 1 parent 4b88798 commit a9c7768 Copy full SHA for a9c7768
File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ pub struct CCursor {
17
17
}
18
18
19
19
impl CCursor {
20
+ #[ inline]
20
21
pub fn new ( index : usize ) -> Self {
21
22
Self {
22
23
index,
@@ -25,9 +26,17 @@ impl CCursor {
25
26
}
26
27
}
27
28
29
+ impl From < Cursor > for CCursor {
30
+ #[ inline]
31
+ fn from ( c : Cursor ) -> Self {
32
+ c. ccursor
33
+ }
34
+ }
35
+
28
36
/// Two `CCursor`s are considered equal if they refer to the same character boundary,
29
37
/// even if one prefers the start of the next row.
30
38
impl PartialEq for CCursor {
39
+ #[ inline]
31
40
fn eq ( & self , other : & Self ) -> bool {
32
41
self . index == other. index
33
42
}
@@ -106,6 +115,7 @@ pub struct PCursor {
106
115
/// Two `PCursor`s are considered equal if they refer to the same character boundary,
107
116
/// even if one prefers the start of the next row.
108
117
impl PartialEq for PCursor {
118
+ #[ inline]
109
119
fn eq ( & self , other : & Self ) -> bool {
110
120
self . paragraph == other. paragraph && self . offset == other. offset
111
121
}
You can’t perform that action at this time.
0 commit comments