Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Hacksaar
rinx
Commits
fce6522e
Commit
fce6522e
authored
Feb 15, 2016
by
Ralf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
env: clone only once per loop iteration
parent
36a757df
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/brain/environment.rs
src/brain/environment.rs
+1
-1
No files found.
src/brain/environment.rs
View file @
fce6522e
...
...
@@ -50,8 +50,8 @@ impl Environment {
mut
handlers
:
Vec
<
EventHandler
>
)
->
EventsResult
{
let
timeout_chan
=
timeout_chan
(
d
);
let
events
=
self
.events
.clone
();
loop
{
let
events
=
self
.events
.clone
();
chan_select!
{
timeout_chan
.recv
()
=>
return
EventsResult
::
Timeout
,
events
.recv
()
->
ev
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment