Skip to content

Commit 5346d90

Browse files
committed
Implement From<char> for GString
1 parent 50ad8bc commit 5346d90

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

godot-core/src/builtin/strings/gstring.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,12 @@ impl From<&[char]> for GString {
363363
}
364364
}
365365

366+
impl From<char> for GString {
367+
fn from(c: char) -> Self {
368+
[c].as_slice().into()
369+
}
370+
}
371+
366372
impl From<&String> for GString {
367373
fn from(value: &String) -> Self {
368374
value.as_str().into()

0 commit comments

Comments
 (0)