From 5f13487eeac36f48d02b9c4f24bd88fedba0f1a0 Mon Sep 17 00:00:00 2001 From: Ivan Tham Date: Mon, 3 Aug 2020 20:43:33 +0800 Subject: [PATCH] Use a shorter way for WORD &() is the same as usize, which is pointer size --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index d26c2b2..fdb5750 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -26,7 +26,7 @@ //! ```rust //! use std::mem::size_of; //! -//! const WORD: usize = size_of::(); +//! const WORD: usize = size_of::<&()>(); //! //! assert_eq!(size_of::>(), 4 * WORD); //! assert_eq!(size_of::>(), 3 * WORD);