From 9ad10d902474051f0c0aafd68a094401ea66a401 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Sat, 28 Jun 2025 05:00:54 +0200 Subject: [PATCH 1/2] associated-items.md: remove redundant word The word does not improve precision, and makes the sentence a bit slower to parse. --- src/items/associated-items.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/items/associated-items.md b/src/items/associated-items.md index c2e3c8dac..22b7cd60b 100644 --- a/src/items/associated-items.md +++ b/src/items/associated-items.md @@ -60,7 +60,7 @@ An *associated function definition* defines a function associated with another type. It is written the same as a [function item]. An example of a common associated function is a `new` function that returns -a value of the type the associated function is associated with. +a value of the type the function is associated with. ```rust struct Struct { From eafaba6d4aa099e992c2134339b09ffec7f02389 Mon Sep 17 00:00:00 2001 From: Travis Cross Date: Thu, 3 Jul 2025 16:30:56 +0000 Subject: [PATCH 2/2] Revise sentence and move to note Rather than just dropping that word, let's revise the sentence overall to make it a bit better, and since it's just an example, let's move this sentence into an admonition. --- src/items/associated-items.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/items/associated-items.md b/src/items/associated-items.md index 22b7cd60b..8f4bc61ef 100644 --- a/src/items/associated-items.md +++ b/src/items/associated-items.md @@ -59,8 +59,8 @@ r[items.associated.fn.def] An *associated function definition* defines a function associated with another type. It is written the same as a [function item]. -An example of a common associated function is a `new` function that returns -a value of the type the function is associated with. +> [!NOTE] +> A common example is an associated function named `new` that returns a value of the type with which it is associated. ```rust struct Struct {