remove move
This commit is contained in:
parent
6333245304
commit
78cf419e9b
2 changed files with 2 additions and 2 deletions
|
@ -35,7 +35,7 @@ fn main() {
|
|||
});
|
||||
|
||||
let pat_clone = Arc::clone(&pattern);
|
||||
thread::spawn(move || loop {
|
||||
thread::spawn(|| loop {
|
||||
websocket(&pat_clone);
|
||||
});
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue