about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-06-26 19:47:09 +0200
committerGitHub <noreply@github.com>2022-06-26 19:47:09 +0200
commit935958e6e434f2a60a774fface59492275a87996 (patch)
treed80e4c65e8e9264599d1145fcbfa1c3419d9c3df
parent93ea1ec1536f3fcc7330395d687acbf19caf7215 (diff)
parent756118e2b99e355ab9916a97efc45989d333fd1d (diff)
downloadrust-935958e6e434f2a60a774fface59492275a87996.tar.gz
rust-935958e6e434f2a60a774fface59492275a87996.zip
Rollup merge of #98541 - Veykril:patch-2, r=Dylan-DPC
Update `std::alloc::System` doc example code style

`return` on the last line of a block is unidiomatic so I don't think the example should be using that here
-rw-r--r--library/std/src/alloc.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/alloc.rs b/library/std/src/alloc.rs
index d554ec59035..a05e0db3af7 100644
--- a/library/std/src/alloc.rs
+++ b/library/std/src/alloc.rs
@@ -102,7 +102,7 @@ pub use alloc_crate::alloc::*;
 ///         if !ret.is_null() {
 ///             ALLOCATED.fetch_add(layout.size(), SeqCst);
 ///         }
-///         return ret
+///         ret
 ///     }
 ///
 ///     unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout) {