We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d78bf1 commit 4becfebCopy full SHA for 4becfeb
crates/model/src/identifiers/account_id.rs
@@ -89,14 +89,14 @@ impl AccountId {
89
#[must_use]
90
pub fn get_issuer(&self) -> Venue {
91
// SAFETY: Account ID is guaranteed to have chars either side of a hyphen
92
- Venue::from_str_unchecked(self.0.split('-').collect::<Vec<&str>>().first().unwrap())
+ Venue::from_str_unchecked(self.0.split_once('-').unwrap().0)
93
}
94
95
/// Returns the account ID assigned by the issuer.
96
97
pub fn get_issuers_id(&self) -> &str {
98
99
- self.0.split('-').collect::<Vec<&str>>().last().unwrap()
+ self.0.split_once('-').unwrap().1
100
101
102
0 commit comments