]> git.lizzy.rs Git - rust.git/commit
impl From<char> for String
authorMatthias Krüger <matthias.krueger@famsik.de>
Wed, 17 Jun 2020 23:36:43 +0000 (01:36 +0200)
committerMatthias Krüger <matthias.krueger@famsik.de>
Thu, 18 Jun 2020 02:58:08 +0000 (04:58 +0200)
commit1d0378c454de72ddcfc08bcc105744923ef2d4d4
treef82fffd42199843ab65f3e0e5ccb2001a9e12d14
parent2935d294ff862fdf96578d0cbbdc289e8e7ba81c
impl From<char> for String

This allows us to write

fn char_to_string() -> String {
    'a'.into()
}

which was not possible before.
src/liballoc/string.rs