about summary refs log tree commit diff
path: root/src/liballoc/raw_vec
diff options
context:
space:
mode:
authorDavid Tolnay <dtolnay@gmail.com>2019-11-29 19:30:49 -0800
committerDavid Tolnay <dtolnay@gmail.com>2019-11-29 20:25:07 -0800
commit1c4d4539690fe841aefea2f54c243be5f0579970 (patch)
tree79e0bce428a31e998d3d83f71eadb2eab4813e2c /src/liballoc/raw_vec
parent9081929d45f12d3f56d43b1d6db7519981580fc9 (diff)
downloadrust-1c4d4539690fe841aefea2f54c243be5f0579970.tar.gz
rust-1c4d4539690fe841aefea2f54c243be5f0579970.zip
Format liballoc with rustfmt
Diffstat (limited to 'src/liballoc/raw_vec')
-rw-r--r--src/liballoc/raw_vec/tests.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/liballoc/raw_vec/tests.rs b/src/liballoc/raw_vec/tests.rs
index d35b62fc1ef..b214cef3011 100644
--- a/src/liballoc/raw_vec/tests.rs
+++ b/src/liballoc/raw_vec/tests.rs
@@ -16,7 +16,9 @@ fn allocator_param() {
 
     // A dumb allocator that consumes a fixed amount of fuel
     // before allocation attempts start failing.
-    struct BoundedAlloc { fuel: usize }
+    struct BoundedAlloc {
+        fuel: usize,
+    }
     unsafe impl Alloc for BoundedAlloc {
         unsafe fn alloc(&mut self, layout: Layout) -> Result<NonNull<u8>, AllocErr> {
             let size = layout.size();
@@ -24,7 +26,10 @@ fn allocator_param() {
                 return Err(AllocErr);
             }
             match Global.alloc(layout) {
-                ok @ Ok(_) => { self.fuel -= size; ok }
+                ok @ Ok(_) => {
+                    self.fuel -= size;
+                    ok
+                }
                 err @ Err(_) => err,
             }
         }