From e456424bb37517ab74839d510d16958924df7fe5 Mon Sep 17 00:00:00 2001 From: Patrick Marks Date: Tue, 21 Jan 2025 15:40:39 +0100 Subject: [PATCH 1/2] Out of date comment in overview *Like* an input, the new for a tracked struct only requires a &-reference to the database: --- book/src/overview.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/book/src/overview.md b/book/src/overview.md index efeb5eef..7ab74d9a 100644 --- a/book/src/overview.md +++ b/book/src/overview.md @@ -163,8 +163,7 @@ struct Ast<'db> { } ``` -Just as with an input, new values are created by invoking `Ast::new`. -Unlike with an input, the `new` for a tracked struct only requires a `&`-reference to the database: +Just as with an input, new values are created by invoking `Ast::new`, and the `new` for a tracked struct only requires a `&`-reference to the database: ```rust #[salsa::tracked] From cd35eb2bc764a6f521ba79e6fd2420fbf48ae1f8 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Wed, 22 Jan 2025 05:40:49 -0500 Subject: [PATCH 2/2] Update book/src/overview.md Co-authored-by: David Barsky --- book/src/overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/src/overview.md b/book/src/overview.md index 7ab74d9a..7e01b0a8 100644 --- a/book/src/overview.md +++ b/book/src/overview.md @@ -163,7 +163,7 @@ struct Ast<'db> { } ``` -Just as with an input, new values are created by invoking `Ast::new`, and the `new` for a tracked struct only requires a `&`-reference to the database: +Just as with an input, new values are created by invoking `Ast::new`. The `new` function on a tracked struct only requires a `&`-reference to the database: ```rust #[salsa::tracked]