diff options
author | Postmodern <postmodern.mod3@gmail.com> | 2022-11-07 07:17:55 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-07 16:17:55 +0100 |
commit | 106648b456396cd7b433848dd6608537d5b811f4 (patch) | |
tree | e0eeb873aed3763c8caa2971c6b3c9f73f952fc9 /app/models | |
parent | 86a80acf40c5ca212ffede62a42806e035d7cab3 (diff) |
Micro-optimization: only split `acct` into two Strings (#19901)
* Since `acct` is split by `@` and assigned to `username` and `domain`, we only need to split `acct` into two Strings.
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/account_alias.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/account_alias.rb b/app/models/account_alias.rb index b421c66e2..b7267d632 100644 --- a/app/models/account_alias.rb +++ b/app/models/account_alias.rb @@ -29,7 +29,7 @@ class AccountAlias < ApplicationRecord end def pretty_acct - username, domain = acct.split('@') + username, domain = acct.split('@', 2) domain.nil? ? username : "#{username}@#{Addressable::IDNA.to_unicode(domain)}" end |