From 10cd1733cbba5c637fa0130a0cd7a7ab6e618226 Mon Sep 17 00:00:00 2001 From: mat Date: Sun, 17 Apr 2022 14:40:26 -0500 Subject: add execute & get_integer --- azalea-brigadier/src/string_reader.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'azalea-brigadier/src/string_reader.rs') diff --git a/azalea-brigadier/src/string_reader.rs b/azalea-brigadier/src/string_reader.rs index 4b390155..403b8e99 100644 --- a/azalea-brigadier/src/string_reader.rs +++ b/azalea-brigadier/src/string_reader.rs @@ -18,6 +18,14 @@ impl From for StringReader { Self { string, cursor: 0 } } } +impl From<&str> for StringReader { + fn from(string: &str) -> Self { + Self { + string: string.to_string(), + cursor: 0, + } + } +} impl StringReader { pub fn string(&self) -> &str { -- cgit v1.2.3