Skip to content

Commit

Permalink
Rollup merge of #98541 - Veykril:patch-2, r=Dylan-DPC
Browse files Browse the repository at this point in the history
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
  • Loading branch information
matthiaskrgr authored Jun 26, 2022
2 parents 300ad26 + 756118e commit 7b82e2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/std/src/alloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 7b82e2e

Please sign in to comment.