Skip to content

Commit ac8d96d

Browse files
committed
Don't call functions in .unwrap_or.
1 parent 6d70977 commit ac8d96d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/helpers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ use std::env;
44
use std::net::TcpStream;
55

66
pub fn connect() -> mpd::Client<TcpStream> {
7-
let addr = env::var("MPD_SOCK").unwrap_or("127.0.0.1:6600".to_owned());
7+
let addr = env::var("MPD_SOCK").unwrap_or_else(|_| "127.0.0.1:6600".to_owned());
88
mpd::Client::connect(&*addr).unwrap()
99
}

0 commit comments

Comments
 (0)