Unused variable?

The error message says unused variable for 'stream'. looks to me like it is being used.


for stream in ... {
  let stream = stream...

is eqiuiv to

for stream in ... {
  let stream0 = stream...

Where is stream0 used?

The stream created inside the loop is a distinct variable with its own scope. The variable you used was a Result <SocketAddr>. The unused variable is a SocketAddr.

1 Like

OK. I think I understand now.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.