diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2018-10-23 18:06:11 +0200 |
|---|---|---|
| committer | Mazdak Farrokhzad <twingoow@gmail.com> | 2018-11-10 01:10:07 +0100 |
| commit | d1d2aa22c0d15465af1daccdb3821450c98d0ed0 (patch) | |
| tree | 18c62f427f6e1efd2edd878b565fcfd1e2897c5c /src/liballoc/string.rs | |
| parent | 53fe6294170e5f872877e87c1b05795b2b4d11d1 (diff) | |
| download | rust-d1d2aa22c0d15465af1daccdb3821450c98d0ed0.tar.gz rust-d1d2aa22c0d15465af1daccdb3821450c98d0ed0.zip | |
reduce list to functions callable in const ctx.
Diffstat (limited to 'src/liballoc/string.rs')
| -rw-r--r-- | src/liballoc/string.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/liballoc/string.rs b/src/liballoc/string.rs index 8f379c4cfb4..5c776292f53 100644 --- a/src/liballoc/string.rs +++ b/src/liballoc/string.rs @@ -1374,7 +1374,7 @@ impl String { /// ``` #[inline] #[stable(feature = "rust1", since = "1.0.0")] - pub const fn len(&self) -> usize { + pub fn len(&self) -> usize { self.vec.len() } @@ -1395,7 +1395,7 @@ impl String { /// ``` #[inline] #[stable(feature = "rust1", since = "1.0.0")] - pub const fn is_empty(&self) -> bool { + pub fn is_empty(&self) -> bool { self.len() == 0 } @@ -1662,7 +1662,7 @@ impl FromUtf8Error { /// assert_eq!(1, error.valid_up_to()); /// ``` #[stable(feature = "rust1", since = "1.0.0")] - pub const fn utf8_error(&self) -> Utf8Error { + pub fn utf8_error(&self) -> Utf8Error { self.error } } |
