From 046e6f6956a286927b96bd10dea8a3094926c80d Mon Sep 17 00:00:00 2001 From: Eva Pace Date: Mon, 3 Jul 2023 15:56:30 -0300 Subject: [PATCH] leaking: add missing space in `F: Send +'a` for clarity --- src/leaking.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/leaking.md b/src/leaking.md index ea29595..dfafd6f 100644 --- a/src/leaking.md +++ b/src/leaking.md @@ -194,7 +194,7 @@ pub fn scoped<'a, F>(f: F) -> JoinGuard<'a> ``` Here `f` is some closure for the other thread to execute. Saying that -`F: Send +'a` is saying that it closes over data that lives for `'a`, and it +`F: Send + 'a` is saying that it closes over data that lives for `'a`, and it either owns that data or the data was Sync (implying `&data` is Send). Because JoinGuard has a lifetime, it keeps all the data it closes over