about summary refs log tree commit diff
path: root/src/libstd/sys_common
diff options
context:
space:
mode:
authorMatthias Geier <Matthias.Geier@gmail.com>2019-04-26 18:43:24 +0200
committerMatthias Geier <Matthias.Geier@gmail.com>2019-04-26 18:43:24 +0200
commitbe12ab070d733303355d433d68efb870e3da753b (patch)
treefd51d36784bd5991bd637631fca0cfb7fa50398b /src/libstd/sys_common
parent597f432489f12a3f33419daa039ccef11a12c4fd (diff)
downloadrust-be12ab070d733303355d433d68efb870e3da753b.tar.gz
rust-be12ab070d733303355d433d68efb870e3da753b.zip
Use "capacity" as parameter name in with_capacity() methods
Closes #60271.
Diffstat (limited to 'src/libstd/sys_common')
-rw-r--r--src/libstd/sys_common/wtf8.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/sys_common/wtf8.rs b/src/libstd/sys_common/wtf8.rs
index f17020de44e..81e606fc165 100644
--- a/src/libstd/sys_common/wtf8.rs
+++ b/src/libstd/sys_common/wtf8.rs
@@ -146,10 +146,10 @@ impl Wtf8Buf {
         Wtf8Buf { bytes: Vec::new() }
     }
 
-    /// Creates a new, empty WTF-8 string with pre-allocated capacity for `n` bytes.
+    /// Creates a new, empty WTF-8 string with pre-allocated capacity for `capacity` bytes.
     #[inline]
-    pub fn with_capacity(n: usize) -> Wtf8Buf {
-        Wtf8Buf { bytes: Vec::with_capacity(n) }
+    pub fn with_capacity(capacity: usize) -> Wtf8Buf {
+        Wtf8Buf { bytes: Vec::with_capacity(capacity) }
     }
 
     /// Creates a WTF-8 string from a UTF-8 `String`.