diff options
| author | mat <github@matdoes.dev> | 2022-04-17 14:40:26 -0500 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-04-17 14:40:26 -0500 |
| commit | 10cd1733cbba5c637fa0130a0cd7a7ab6e618226 (patch) | |
| tree | 2767615fe92aa4481e3aabf503bc840def4320f9 /azalea-brigadier/src/string_reader.rs | |
| parent | 82ed6baea5c4e0d00f5fc2bbeb45cbb2838a3784 (diff) | |
| download | azalea-drasl-10cd1733cbba5c637fa0130a0cd7a7ab6e618226.tar.xz | |
add execute & get_integer
Diffstat (limited to 'azalea-brigadier/src/string_reader.rs')
| -rw-r--r-- | azalea-brigadier/src/string_reader.rs | 8 |
1 files changed, 8 insertions, 0 deletions
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<String> 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 { |
