From 774520c76d6195276ea514e1d19c07234fc18f1f Mon Sep 17 00:00:00 2001 From: painbaba Date: Mon, 31 Aug 2026 05:16:37 +0530 Subject: [PATCH] docs: stop using deprecated smallvec! macro in README example The smallvec! macro has been deprecated since 2.0.0-alpha.13 (note: 'use SmallVec::from instead'). Replace the README example with SmallVec::from([...]) and drop the macro from the use statement. Also strips trailing whitespace on the removed line. Fixes #518. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9f86a0e..1e1d4e8 100644 --- a/README.md +++ b/README.md @@ -26,10 +26,10 @@ ## Example ```rust -use smallvec::{SmallVec, smallvec}; - +use smallvec::SmallVec; + // This SmallVec can hold up to 4 items on the stack: -let mut v: SmallVec = smallvec![1, 2, 3, 4]; +let mut v: SmallVec = SmallVec::from([1, 2, 3, 4]); // It will automatically move its contents to the heap if // contains more than four items: