@@ -161,8 +161,8 @@ impl EventProcessor {
161161 // Confirm that this operator does not already exist
162162 if self . db . state ( ) . operator_exists ( & operator_id) {
163163 return Err ( ExecutionError :: invalid_operator_event (
164- Some ( operator_id) ,
165- Some ( owner) ,
164+ operator_id,
165+ owner,
166166 format ! ( "Operator with id {operator_id:?} already exists in database" ) ,
167167 None ,
168168 ) ) ;
@@ -173,8 +173,8 @@ impl EventProcessor {
173173 let public_key_str = public_key_str. trim_start_matches ( "0x" ) ;
174174 let data = hex:: decode ( public_key_str) . map_err ( |e| {
175175 ExecutionError :: invalid_operator_event (
176- Some ( operator_id) ,
177- Some ( owner) ,
176+ operator_id,
177+ owner,
178178 "Failed to decode public key data from hex" ,
179179 Some ( Box :: new ( e) ) ,
180180 )
@@ -185,8 +185,8 @@ impl EventProcessor {
185185 let data = & data[ 64 ..] ;
186186 let data = String :: from_utf8 ( data. to_vec ( ) ) . map_err ( |e| {
187187 ExecutionError :: invalid_operator_event (
188- Some ( operator_id) ,
189- Some ( owner) ,
188+ operator_id,
189+ owner,
190190 "Failed to convert to UTF8 String" ,
191191 Some ( Box :: new ( e) ) ,
192192 )
@@ -195,8 +195,8 @@ impl EventProcessor {
195195 } else {
196196 String :: from_utf8 ( data. to_vec ( ) ) . map_err ( |e| {
197197 ExecutionError :: invalid_operator_event (
198- Some ( operator_id) ,
199- Some ( owner) ,
198+ operator_id,
199+ owner,
200200 "Failed to convert to UTF8 String" ,
201201 Some ( Box :: new ( e) ) ,
202202 )
@@ -206,8 +206,8 @@ impl EventProcessor {
206206 // Construct the Operator and insert it into the database
207207 let operator = Operator :: new ( & data, operator_id, owner) . map_err ( |e| {
208208 ExecutionError :: invalid_operator_event (
209- Some ( operator_id) ,
210- Some ( owner) ,
209+ operator_id,
210+ owner,
211211 "Failed to construct operator" ,
212212 Some ( Box :: new ( e) ) ,
213213 )
0 commit comments