Skip to content

Commit 2d5973b

Browse files
committed
Merge branch 'main' of github.com:CoLearn-Dev/colink-sdk-rust-dev into magic_mount
2 parents 111885e + ad6832d commit 2d5973b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/extensions/instant_server.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ impl Drop for InstantServer {
2828
let working_dir = Path::new(&colink_home)
2929
.join("instant_servers")
3030
.join(self.id.clone());
31-
std::fs::remove_dir_all(&working_dir).unwrap();
31+
std::fs::remove_dir_all(working_dir).unwrap();
3232
}
3333
}
3434

@@ -53,7 +53,7 @@ impl InstantServer {
5353
}
5454
let instant_server_id = uuid::Uuid::new_v4().to_string();
5555
let mut port = rand::thread_rng().gen_range(10000..20000);
56-
while std::net::TcpStream::connect(&format!("127.0.0.1:{}", port)).is_ok() {
56+
while std::net::TcpStream::connect(format!("127.0.0.1:{}", port)).is_ok() {
5757
port = rand::thread_rng().gen_range(10000..20000);
5858
}
5959
let working_dir = Path::new(&colink_home)
@@ -94,7 +94,7 @@ impl InstantServer {
9494
.unwrap();
9595
loop {
9696
if std::fs::metadata(working_dir.join("host_token.txt")).is_ok()
97-
&& std::net::TcpStream::connect(&format!("127.0.0.1:{}", port)).is_ok()
97+
&& std::net::TcpStream::connect(format!("127.0.0.1:{}", port)).is_ok()
9898
{
9999
break;
100100
}
@@ -125,7 +125,7 @@ impl Drop for InstantRegistry {
125125
fn drop(&mut self) {
126126
let colink_home = get_colink_home().unwrap();
127127
let registry_file = Path::new(&colink_home).join("reg_config");
128-
std::fs::remove_file(&registry_file).unwrap();
128+
std::fs::remove_file(registry_file).unwrap();
129129
}
130130
}
131131

0 commit comments

Comments
 (0)