From 928eb95c72fb45ddb1da0b82a1abdad18da0310e Mon Sep 17 00:00:00 2001 From: Ches Martin Date: Sun, 1 Mar 2015 18:01:55 -0500 Subject: [PATCH] rust: proc() syntax obsolete, thread not in prelude --- snippets/rust.snippets | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/snippets/rust.snippets b/snippets/rust.snippets index 5a64e76..77e5132 100644 --- a/snippets/rust.snippets +++ b/snippets/rust.snippets @@ -161,8 +161,12 @@ snippet ss "static string declaration" snippet stat "static item declaration" static ${1}: ${2:usize} = ${0}; # Concurrency -snippet spawn "spawn a task or thread" - spawn(proc() { +snippet scoped "spawn a scoped thread" + thread::scoped(${1:move }|| { + ${0} + }); +snippet spawn "spawn a thread" + thread::spawn(${1:move }|| { ${0} }); snippet chan "Declare (Sender, Receiver) pair of asynchronous channel()"