@@ -43,7 +43,7 @@ enum Step {
4343
4444impl < A > Context < A > {
4545 fn new ( ) -> Self {
46- Context { marker : PhantomData , step : Step :: Root }
46+ Self { marker : PhantomData , step : Step :: Root }
4747 }
4848
4949 fn select < B > ( & self , path : impl Into < String > ) -> Context < B > {
@@ -56,7 +56,7 @@ impl<A> Context<A> {
5656 }
5757 }
5858
59- pub fn eq ( & self , other : Context < A > ) -> Context < bool > {
59+ pub fn eq ( & self , other : Self ) -> Context < bool > {
6060 Context {
6161 marker : Default :: default ( ) ,
6262 step : Step :: Eq {
@@ -66,7 +66,7 @@ impl<A> Context<A> {
6666 }
6767 }
6868
69- pub fn and ( & self , other : Context < A > ) -> Context < bool > {
69+ pub fn and ( & self , other : Self ) -> Context < bool > {
7070 Context {
7171 marker : Default :: default ( ) ,
7272 step : Step :: And {
@@ -76,7 +76,7 @@ impl<A> Context<A> {
7676 }
7777 }
7878
79- pub fn or ( & self , other : Context < A > ) -> Context < bool > {
79+ pub fn or ( & self , other : Self ) -> Context < bool > {
8080 Context {
8181 marker : Default :: default ( ) ,
8282 step : Step :: Or {
@@ -88,8 +88,8 @@ impl<A> Context<A> {
8888}
8989
9090impl Context < String > {
91- pub fn concat ( & self , other : Context < String > ) -> Context < String > {
92- Context {
91+ pub fn concat ( & self , other : Self ) -> Self {
92+ Self {
9393 marker : Default :: default ( ) ,
9494 step : Step :: Concat {
9595 left : Box :: new ( self . step . clone ( ) ) ,
@@ -199,27 +199,27 @@ impl Context<Github> {
199199impl fmt:: Display for Step {
200200 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
201201 match self {
202- Step :: Root => write ! ( f, "" ) ,
203- Step :: Select { name, object } => {
204- if matches ! ( * * object, Step :: Root ) {
202+ Self :: Root => write ! ( f, "" ) ,
203+ Self :: Select { name, object } => {
204+ if matches ! ( * * object, Self :: Root ) {
205205 write ! ( f, "{name}" )
206206 } else {
207207 write ! ( f, "{object}.{name}" )
208208 }
209209 }
210- Step :: Eq { left, right } => {
210+ Self :: Eq { left, right } => {
211211 write ! ( f, "{left} == {right}" )
212212 }
213- Step :: And { left, right } => {
213+ Self :: And { left, right } => {
214214 write ! ( f, "{left} && {right}" )
215215 }
216- Step :: Or { left, right } => {
216+ Self :: Or { left, right } => {
217217 write ! ( f, "{left} || {right}" )
218218 }
219- Step :: Literal ( value) => {
219+ Self :: Literal ( value) => {
220220 write ! ( f, "'{value}'" )
221221 }
222- Step :: Concat { left, right } => {
222+ Self :: Concat { left, right } => {
223223 write ! ( f, "{left}{right}" )
224224 }
225225 }
@@ -234,13 +234,13 @@ impl<A> fmt::Display for Context<A> {
234234
235235impl < A > From < Context < A > > for Expression {
236236 fn from ( value : Context < A > ) -> Self {
237- Expression :: new ( value. to_string ( ) )
237+ Self :: new ( value. to_string ( ) )
238238 }
239239}
240240
241241impl < T : Into < String > > From < T > for Context < String > {
242242 fn from ( value : T ) -> Self {
243- Context {
243+ Self {
244244 marker : Default :: default ( ) ,
245245 step : Step :: Literal ( value. into ( ) ) ,
246246 }
0 commit comments