File tree 2 files changed +5
-11
lines changed
2 files changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -60,15 +60,13 @@ fn main() {
60
60
// Attempt to create and write to the file
61
61
let mut file = match File :: create ( & file_path) {
62
62
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 ( ) ) ,
64
64
} ;
65
65
66
66
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 ( ) ) ;
68
68
}
69
-
70
- println ! ( "File successfully written to {file_path:?}" ) ;
71
69
}
72
70
Err ( e) => panic ! ( "Error encoding torrent: {e}" ) ,
73
- } ;
71
+ }
74
72
}
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ impl TestEnv {
84
84
pub fn provides_a_private_tracker ( & self ) -> bool {
85
85
if !self . is_shared ( ) {
86
86
return false ;
87
- } ;
87
+ }
88
88
89
89
match self . server_settings ( ) {
90
90
Some ( settings) => settings. tracker . private ,
@@ -148,11 +148,7 @@ impl TestEnv {
148
148
State :: RunningShared => {
149
149
let connect_url_env_var = ENV_VAR_DB_CONNECT_URL ;
150
150
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 ( )
156
152
}
157
153
State :: RunningIsolated => internal_connect_url,
158
154
State :: Stopped => None ,
You can’t perform that action at this time.
0 commit comments