File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11use geo:: algorithm:: haversine_distance:: HaversineDistance ;
22use parking_lot:: RwLock ;
33use std:: io:: Write ;
4- use std:: net:: { Ipv4Addr , SocketAddr , SocketAddrV4 } ;
54use std:: sync:: Arc ;
65use std:: thread;
76use std:: time:: Duration ;
8- use tiny_http:: { Request , Response } ;
7+ use tiny_http:: Request ;
98use url:: Url ;
109
1110use crate :: base:: music:: SongInfo ;
@@ -14,6 +13,7 @@ mod api;
1413mod base;
1514
1615static LINE_MAX : usize = 60 ;
16+ static MAIN_BODY : & str = include_str ! ( "main.txt" ) ;
1717
1818#[ derive( Debug ) ]
1919struct State {
@@ -155,8 +155,7 @@ fn root(request: Request, state: Arc<RwLock<State>>) {
155155 time, si. track, si. artist, si. month_artist
156156 ) ;
157157
158- let body = std:: fs:: read_to_string ( "src/main.txt" )
159- . unwrap ( )
158+ let body = MAIN_BODY
160159 . replace ( "🎵" , & song_string)
161160 . replace ( "📌" , & location_string) ;
162161
You can’t perform that action at this time.
0 commit comments