File tree Expand file tree Collapse file tree 7 files changed +8
-8
lines changed
frameworks/Rust/hyperlane/src Expand file tree Collapse file tree 7 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 1- use crate :: * ;
1+ use super :: * ;
22
33pub fn get_db_connection ( ) -> & ' static DbPoolConnection {
44 & DB
Original file line number Diff line number Diff line change 1- use crate :: * ;
1+ use super :: * ;
22
33pub static DB : Lazy < DbPoolConnection > = Lazy :: new ( || block_on ( async { connection_db ( ) . await } ) ) ;
44pub static CACHE : Lazy < Vec < QueryRow > > = Lazy :: new ( || block_on ( async { init_cache ( ) . await } ) ) ;
Original file line number Diff line number Diff line change 1- use crate :: * ;
1+ use super :: * ;
22
33pub async fn request ( ctx : Context ) {
44 ctx. set_response_header ( CONNECTION , CONNECTION_KEEP_ALIVE )
Original file line number Diff line number Diff line change 1- use crate :: * ;
1+ use super :: * ;
22
33pub async fn json ( ctx : Context ) {
44 let json: Value = json ! ( {
Original file line number Diff line number Diff line change 1- use crate :: * ;
1+ use super :: * ;
22
33fn runtime ( ) -> Runtime {
44 Builder :: new_multi_thread ( )
55 . worker_threads ( get_thread_count ( ) )
66 . thread_stack_size ( 1_048_576 )
77 . max_blocking_threads ( 1_024_000 )
8- . max_io_events_per_tick ( 1024000 )
8+ . max_io_events_per_tick ( 1_024_000 )
99 . enable_all ( )
1010 . build ( )
1111 . unwrap ( )
Original file line number Diff line number Diff line change 1- use crate :: * ;
1+ use super :: * ;
22
33pub type DbPoolConnection = Pool < Postgres > ;
44pub type Queries = i32 ;
Original file line number Diff line number Diff line change 1- use crate :: * ;
1+ use super :: * ;
22
33pub fn escape_html ( input : & str ) -> String {
44 let mut result: String = String :: new ( ) ;
You can’t perform that action at this time.
0 commit comments