remove move

This commit is contained in:
jane 2021-12-28 20:55:56 -05:00
parent 6333245304
commit 78cf419e9b
2 changed files with 2 additions and 2 deletions

View file

@ -35,7 +35,7 @@ fn main() {
});
let pat_clone = Arc::clone(&pattern);
thread::spawn(move || loop {
thread::spawn(|| loop {
websocket(&pat_clone);
});

View file

@ -7,7 +7,7 @@ pub fn websocket(pattern: &Arc<Mutex<Vec<Box<dyn Pattern>>>>) {
let server = TcpListener::bind("0.0.0.0:29999").unwrap();
for stream in server.incoming() {
let clone = Arc::clone(pattern);
thread::spawn (move || {
thread::spawn (|| {
let mut websocket = accept(stream.unwrap()).unwrap();
loop {
let input = websocket.read_message().unwrap();