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 93ea1ec + 756118e commit 935958e
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 935958e

Please sign in to comment.