From 5bad0766fd20d3470885613257b5815867bd41a8 Mon Sep 17 00:00:00 2001 From: Jake Hillion Date: Mon, 23 May 2022 06:43:47 +0100 Subject: [PATCH] simplified main function --- examples/tls/main.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/examples/tls/main.rs b/examples/tls/main.rs index 5abead4..0087586 100644 --- a/examples/tls/main.rs +++ b/examples/tls/main.rs @@ -4,11 +4,7 @@ use std::fs::File; use std::net::{TcpListener, TcpStream}; fn main() { - let mut args = std::env::args(); - - let entrypoint = args.next(); - - match entrypoint { + match std::env::args().next() { Some(s) => match s.as_str() { "connection_listener" => connection_listener_entrypoint(), "http_handler" => http_handler_entrypoint(),