File tree Expand file tree Collapse file tree 2 files changed +5
-11
lines changed
Expand file tree Collapse file tree 2 files changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -60,15 +60,13 @@ fn main() {
6060 // Attempt to create and write to the file
6161 let mut file = match File :: create ( & file_path) {
6262 Ok ( file) => file,
63- Err ( e) => panic ! ( "Failed to create file {file_path:? }: {e}" ) ,
63+ Err ( e) => panic ! ( "Failed to create file {}: {e}" , file_path . display ( ) ) ,
6464 } ;
6565
6666 if let Err ( e) = file. write_all ( & bytes) {
67- panic ! ( "Failed to write to file {file_path:? }: {e}" ) ;
67+ panic ! ( "Failed to write to file {}: {e}" , file_path . display ( ) ) ;
6868 }
69-
70- println ! ( "File successfully written to {file_path:?}" ) ;
7169 }
7270 Err ( e) => panic ! ( "Error encoding torrent: {e}" ) ,
73- } ;
71+ }
7472}
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ impl TestEnv {
8484 pub fn provides_a_private_tracker ( & self ) -> bool {
8585 if !self . is_shared ( ) {
8686 return false ;
87- } ;
87+ }
8888
8989 match self . server_settings ( ) {
9090 Some ( settings) => settings. tracker . private ,
@@ -148,11 +148,7 @@ impl TestEnv {
148148 State :: RunningShared => {
149149 let connect_url_env_var = ENV_VAR_DB_CONNECT_URL ;
150150
151- if let Ok ( connect_url) = env:: var ( connect_url_env_var) {
152- Some ( connect_url)
153- } else {
154- None
155- }
151+ env:: var ( connect_url_env_var) . ok ( )
156152 }
157153 State :: RunningIsolated => internal_connect_url,
158154 State :: Stopped => None ,
You can’t perform that action at this time.
0 commit comments