mirror of
https://github.com/astro/buzzrelay.git
synced 2024-11-21 11:41:00 +00:00
Fix clippy
This commit is contained in:
parent
f8d91b6a7b
commit
997471d094
1 changed files with 3 additions and 3 deletions
|
@ -46,17 +46,17 @@ impl Actor {
|
|||
let host;
|
||||
if uri.starts_with("acct:tag-") {
|
||||
let off = "acct:tag-".len();
|
||||
let Some(at) = uri.find('@') else { return None; };
|
||||
let at = uri.find('@')?;
|
||||
kind = ActorKind::from_tag(&uri[off..at]);
|
||||
host = Arc::new(uri[at + 1..].to_string());
|
||||
} else if uri.starts_with("acct:instance-") {
|
||||
let off = "acct:instance-".len();
|
||||
let Some(at) = uri.find('@') else { return None; };
|
||||
let at = uri.find('@')?;
|
||||
kind = ActorKind::InstanceRelay(uri[off..at].to_lowercase());
|
||||
host = Arc::new(uri[at + 1..].to_string());
|
||||
} else if uri.starts_with("acct:language-") {
|
||||
let off = "acct:language-".len();
|
||||
let Some(at) = uri.find('@') else { return None; };
|
||||
let at = uri.find('@')?;
|
||||
kind = ActorKind::from_language(&uri[off..at])?;
|
||||
host = Arc::new(uri[at + 1..].to_string());
|
||||
} else if uri.starts_with("https://") {
|
||||
|
|
Loading…
Reference in a new issue