aboutsummaryrefslogtreecommitdiff
path: root/azalea-chat/src
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-chat/src')
-rwxr-xr-xazalea-chat/src/component.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/azalea-chat/src/component.rs b/azalea-chat/src/component.rs
index ea485049..d889f3ef 100755
--- a/azalea-chat/src/component.rs
+++ b/azalea-chat/src/component.rs
@@ -292,6 +292,11 @@ impl From<String> for Component {
})
}
}
+impl From<&str> for Component {
+ fn from(s: &str) -> Self {
+ Self::from(s.to_string())
+ }
+}
impl Display for Component {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {