From 37aa93ad29995a0e6e0d9db14d5fa1ab8c113897 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Fri, 18 Jul 2025 16:01:01 +0200 Subject: [PATCH 1/2] glossary.md: tweak description of "dispatch" - trait objects are not a *mechanism* - *prefers* is not explained, so rather leave it out --- src/glossary.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/glossary.md b/src/glossary.md index dabd65d7c..01bc93773 100644 --- a/src/glossary.md +++ b/src/glossary.md @@ -64,8 +64,7 @@ root, including through [paths] of public modules. Dispatch is the mechanism to determine which specific version of code is actually run when it involves polymorphism. Two major forms of dispatch are static dispatch and -dynamic dispatch. While Rust favors static dispatch, it also supports dynamic dispatch -through a mechanism called ‘trait objects’. +dynamic dispatch. Rust supports dynamic dispatch through the use of [trait objects][type.trait-object]. ### Dynamically sized type From 82358980bd840855b61b7d3bff28af11cb3355b0 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Fri, 18 Jul 2025 16:02:32 +0200 Subject: [PATCH 2/2] unwrap --- src/glossary.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/glossary.md b/src/glossary.md index 01bc93773..ddeabeb52 100644 --- a/src/glossary.md +++ b/src/glossary.md @@ -62,9 +62,7 @@ root, including through [paths] of public modules. ### Dispatch -Dispatch is the mechanism to determine which specific version of code is actually -run when it involves polymorphism. Two major forms of dispatch are static dispatch and -dynamic dispatch. Rust supports dynamic dispatch through the use of [trait objects][type.trait-object]. +Dispatch is the mechanism to determine which specific version of code is actually run when it involves polymorphism. Two major forms of dispatch are static dispatch and dynamic dispatch. Rust supports dynamic dispatch through the use of [trait objects][type.trait-object]. ### Dynamically sized type