@@ -122,7 +122,9 @@ impl MethodName {
122122 ( MethodFunction :: Query , MethodObject :: Principal ) => "Principal/query" ,
123123 ( MethodFunction :: Changes , MethodObject :: Principal ) => "Principal/changes" ,
124124 ( MethodFunction :: QueryChanges , MethodObject :: Principal ) => "Principal/queryChanges" ,
125- ( MethodFunction :: GetAvailability , MethodObject :: Principal ) => "Principal/getAvailability" ,
125+ ( MethodFunction :: GetAvailability , MethodObject :: Principal ) => {
126+ "Principal/getAvailability"
127+ }
126128
127129 ( MethodFunction :: Get , MethodObject :: Quota ) => "Quota/get" ,
128130 ( MethodFunction :: Changes , MethodObject :: Quota ) => "Quota/changes" ,
@@ -153,9 +155,13 @@ impl MethodName {
153155 ( MethodFunction :: Set , MethodObject :: FileNode ) => "FileNode/set" ,
154156
155157 ( MethodFunction :: Get , MethodObject :: ShareNotification ) => "ShareNotification/get" ,
156- ( MethodFunction :: Changes , MethodObject :: ShareNotification ) => "ShareNotification/changes" ,
158+ ( MethodFunction :: Changes , MethodObject :: ShareNotification ) => {
159+ "ShareNotification/changes"
160+ }
157161 ( MethodFunction :: Query , MethodObject :: ShareNotification ) => "ShareNotification/query" ,
158- ( MethodFunction :: QueryChanges , MethodObject :: ShareNotification ) => "ShareNotification/queryChanges" ,
162+ ( MethodFunction :: QueryChanges , MethodObject :: ShareNotification ) => {
163+ "ShareNotification/queryChanges"
164+ }
159165 ( MethodFunction :: Set , MethodObject :: ShareNotification ) => "ShareNotification/set" ,
160166
161167 ( MethodFunction :: Get , MethodObject :: Calendar ) => "Calendar/get" ,
@@ -165,19 +171,33 @@ impl MethodName {
165171 ( MethodFunction :: Get , MethodObject :: CalendarEvent ) => "CalendarEvent/get" ,
166172 ( MethodFunction :: Changes , MethodObject :: CalendarEvent ) => "CalendarEvent/changes" ,
167173 ( MethodFunction :: Query , MethodObject :: CalendarEvent ) => "CalendarEvent/query" ,
168- ( MethodFunction :: QueryChanges , MethodObject :: CalendarEvent ) => "CalendarEvent/queryChanges" ,
174+ ( MethodFunction :: QueryChanges , MethodObject :: CalendarEvent ) => {
175+ "CalendarEvent/queryChanges"
176+ }
169177 ( MethodFunction :: Set , MethodObject :: CalendarEvent ) => "CalendarEvent/set" ,
170178 ( MethodFunction :: Copy , MethodObject :: CalendarEvent ) => "CalendarEvent/copy" ,
171179 ( MethodFunction :: Parse , MethodObject :: CalendarEvent ) => "CalendarEvent/parse" ,
172180
173- ( MethodFunction :: Get , MethodObject :: CalendarEventNotification ) => "CalendarEventNotification/get" ,
174- ( MethodFunction :: Changes , MethodObject :: CalendarEventNotification ) => "CalendarEventNotification/changes" ,
175- ( MethodFunction :: Query , MethodObject :: CalendarEventNotification ) => "CalendarEventNotification/query" ,
176- ( MethodFunction :: QueryChanges , MethodObject :: CalendarEventNotification ) => "CalendarEventNotification/queryChanges" ,
177- ( MethodFunction :: Set , MethodObject :: CalendarEventNotification ) => "CalendarEventNotification/set" ,
181+ ( MethodFunction :: Get , MethodObject :: CalendarEventNotification ) => {
182+ "CalendarEventNotification/get"
183+ }
184+ ( MethodFunction :: Changes , MethodObject :: CalendarEventNotification ) => {
185+ "CalendarEventNotification/changes"
186+ }
187+ ( MethodFunction :: Query , MethodObject :: CalendarEventNotification ) => {
188+ "CalendarEventNotification/query"
189+ }
190+ ( MethodFunction :: QueryChanges , MethodObject :: CalendarEventNotification ) => {
191+ "CalendarEventNotification/queryChanges"
192+ }
193+ ( MethodFunction :: Set , MethodObject :: CalendarEventNotification ) => {
194+ "CalendarEventNotification/set"
195+ }
178196
179197 ( MethodFunction :: Get , MethodObject :: ParticipantIdentity ) => "ParticipantIdentity/get" ,
180- ( MethodFunction :: Changes , MethodObject :: ParticipantIdentity ) => "ParticipantIdentity/changes" ,
198+ ( MethodFunction :: Changes , MethodObject :: ParticipantIdentity ) => {
199+ "ParticipantIdentity/changes"
200+ }
181201 ( MethodFunction :: Set , MethodObject :: ParticipantIdentity ) => "ParticipantIdentity/set" ,
182202
183203 ( MethodFunction :: Echo , MethodObject :: Core ) => "Core/echo" ,
@@ -186,7 +206,7 @@ impl MethodName {
186206 }
187207
188208 pub fn parse ( s : & str ) -> Option < Self > {
189- hashify:: tiny_map!( s. as_bytes( ) ,
209+ hashify:: tiny_map!( s. as_bytes( ) ,
190210 "PushSubscription/get" => ( MethodObject :: PushSubscription , MethodFunction :: Get ) ,
191211 "PushSubscription/set" => ( MethodObject :: PushSubscription , MethodFunction :: Set ) ,
192212
@@ -295,7 +315,6 @@ impl MethodName {
295315
296316 ) . map ( |( obj, fnc) | MethodName { obj, fnc } )
297317 }
298-
299318}
300319
301320impl Display for MethodObject {
@@ -326,17 +345,15 @@ impl Display for MethodObject {
326345 }
327346}
328347
329-
330348impl < ' de > serde:: Deserialize < ' de > for MethodName {
331349 fn deserialize < D > ( deserializer : D ) -> Result < Self , D :: Error >
332350 where
333351 D : serde:: Deserializer < ' de > ,
334352 {
335353 let value = <& str >:: deserialize ( deserializer) ?;
336354
337- MethodName :: parse ( value) . ok_or_else ( || {
338- serde:: de:: Error :: custom ( format ! ( "Invalid method name: {:?}" , value) )
339- } )
355+ MethodName :: parse ( value)
356+ . ok_or_else ( || serde:: de:: Error :: custom ( format ! ( "Invalid method name: {:?}" , value) ) )
340357 }
341358}
342359
0 commit comments