From eb3bad54770cdf5139c22d78d5ff62e4f31b9562 Mon Sep 17 00:00:00 2001 From: Saksham Mittal Date: Tue, 26 Sep 2023 14:16:17 +0530 Subject: [PATCH] fix: remove allow_connect() from more examples --- examples/ipc_server_with_database.rs | 1 - examples/network_server.rs | 1 - examples/server_with_database.rs | 2 -- 3 files changed, 4 deletions(-) diff --git a/examples/ipc_server_with_database.rs b/examples/ipc_server_with_database.rs index b0c438a..8e64b0e 100644 --- a/examples/ipc_server_with_database.rs +++ b/examples/ipc_server_with_database.rs @@ -274,7 +274,6 @@ fn run_client_read() { SafetyContext::new() .enable(Networking::nothing() // Necessary for DNS - .allow_connect().yes_really() .allow_start_udp_servers().yes_really() .allow_start_tcp_clients()).unwrap() // For some reason only if we make two requests with a client does it use multiple threads, diff --git a/examples/network_server.rs b/examples/network_server.rs index 016be5c..cba3b6d 100644 --- a/examples/network_server.rs +++ b/examples/network_server.rs @@ -88,7 +88,6 @@ fn main() { thread::sleep(std::time::Duration::from_millis(50)); SafetyContext::new() .enable(Networking::nothing() - .allow_connect().yes_really() .allow_running_tcp_servers() .allow_start_tcp_clients() ).unwrap() diff --git a/examples/server_with_database.rs b/examples/server_with_database.rs index 3725a79..27dc439 100644 --- a/examples/server_with_database.rs +++ b/examples/server_with_database.rs @@ -184,7 +184,6 @@ fn run_client_write(msg: &str) { // Set up extrasafe context SafetyContext::new() .enable(Networking::nothing() - .allow_connect().yes_really() .allow_start_tcp_clients()).unwrap() .apply_to_current_thread() .unwrap(); @@ -225,7 +224,6 @@ fn run_client_read() { // enable extrasafe context SafetyContext::new() .enable(Networking::nothing() - .allow_connect().yes_really() // Necessary for DNS .allow_start_udp_servers().yes_really() .allow_start_tcp_clients()).unwrap()