Skip to content

Instantly share code, notes, and snippets.

@akiradeveloper
Created December 16, 2021 14:09
Show Gist options
  • Save akiradeveloper/bff6ffcf091f980f8026cfa06967f7d9 to your computer and use it in GitHub Desktop.
Save akiradeveloper/bff6ffcf091f980f8026cfa06967f7d9 to your computer and use it in GitHub Desktop.
なんで(1)はあかんのや?
impl X {
fn f(&self) -> Y {
}
}
let x: X;
// (1)
std::thread::spawn(move || {
let y = x.f();
});
// (2)
let y = x.f();
std::thread::spanw(move || {
let mut y = y;
|);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment