@@ -282,6 +282,7 @@ fn get_signing_key(config: &Config) -> Result<SigningKey> {
282282pub fn lazer_exporter ( config : Config , state : Arc < state:: State > ) -> Vec < JoinHandle < ( ) > > {
283283 let mut handles = vec ! [ ] ;
284284
285+ #[ allow( clippy:: panic, reason = "agent can't work without keypair" ) ]
285286 let signing_key = match get_signing_key ( & config) {
286287 Ok ( signing_key) => signing_key,
287288 Err ( e) => {
@@ -324,7 +325,7 @@ pub fn lazer_exporter(config: Config, state: Arc<state::State>) -> Vec<JoinHandl
324325 handles
325326}
326327
327- #[ allow( clippy:: module_inception) ]
328+ #[ allow( clippy:: module_inception, reason = "" ) ]
328329mod lazer_exporter {
329330 use {
330331 crate :: agent:: {
@@ -381,6 +382,7 @@ mod lazer_exporter {
381382 S : LocalStore ,
382383 S : Send + Sync + ' static ,
383384 {
385+ #[ allow( clippy:: panic, reason = "lazer exporter can't work without symbols" ) ]
384386 // We can't publish to Lazer without symbols, so crash the process if it fails.
385387 let mut lazer_symbols = match get_lazer_symbol_map ( & config. history_url ) . await {
386388 Ok ( symbol_map) => {
@@ -435,6 +437,7 @@ mod lazer_exporter {
435437 let source_timestamp_micros = price_info. timestamp. and_utc( ) . timestamp_micros( ) ;
436438 let source_timestamp = MessageField :: some( Timestamp {
437439 seconds: source_timestamp_micros / 1_000_000 ,
440+ #[ allow( clippy:: cast_possible_truncation, reason = "value is always less than one billion" ) ]
438441 nanos: ( source_timestamp_micros % 1_000_000 * 1000 ) as i32 ,
439442 special_fields: Default :: default ( ) ,
440443 } ) ;
@@ -710,7 +713,7 @@ mod tests {
710713 let mut temp_file = NamedTempFile :: new ( ) . unwrap ( ) ;
711714 temp_file
712715 . as_file_mut ( )
713- . write ( private_key_string. as_bytes ( ) )
716+ . write_all ( private_key_string. as_bytes ( ) )
714717 . unwrap ( ) ;
715718 temp_file. flush ( ) . unwrap ( ) ;
716719 temp_file
@@ -758,8 +761,8 @@ mod tests {
758761 . unwrap ( ) ;
759762 let price = PriceInfo {
760763 status : PriceStatus :: Trading ,
761- price : 100_000_00000000i64 ,
762- conf : 1_00000000u64 ,
764+ price : 10_000_000_000_000i64 ,
765+ conf : 100_000_000u64 ,
763766 timestamp : Default :: default ( ) ,
764767 } ;
765768 state. update ( btc_id, price) . await . unwrap ( ) ;
@@ -787,7 +790,7 @@ mod tests {
787790 } else {
788791 panic ! ( "expected price_update" )
789792 } ;
790- assert_eq ! ( price_update. price, Some ( 100_000_00000000i64 ) ) ;
793+ assert_eq ! ( price_update. price, Some ( 10_000_000_000_000i64 ) ) ;
791794 }
792795 _ => panic ! ( "channel should have a transaction waiting" ) ,
793796 }
0 commit comments