Fix use-self
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
c3c91e9d80
commit
eae41fc411
18 changed files with 47 additions and 48 deletions
|
@ -259,19 +259,19 @@ impl Destination {
|
|||
#[tracing::instrument(skip(self))]
|
||||
pub fn get_prefix(&self) -> Vec<u8> {
|
||||
let mut prefix = match self {
|
||||
Destination::Appservice(server) => {
|
||||
Self::Appservice(server) => {
|
||||
let mut p = b"+".to_vec();
|
||||
p.extend_from_slice(server.as_bytes());
|
||||
p
|
||||
},
|
||||
Destination::Push(user, pushkey) => {
|
||||
Self::Push(user, pushkey) => {
|
||||
let mut p = b"$".to_vec();
|
||||
p.extend_from_slice(user.as_bytes());
|
||||
p.push(0xFF);
|
||||
p.extend_from_slice(pushkey.as_bytes());
|
||||
p
|
||||
},
|
||||
Destination::Normal(server) => {
|
||||
Self::Normal(server) => {
|
||||
let mut p = Vec::new();
|
||||
p.extend_from_slice(server.as_bytes());
|
||||
p
|
||||
|
|
|
@ -421,8 +421,8 @@ impl FedDest {
|
|||
impl fmt::Display for FedDest {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
match self {
|
||||
FedDest::Named(host, port) => write!(f, "{host}{port}"),
|
||||
FedDest::Literal(addr) => write!(f, "{addr}"),
|
||||
Self::Named(host, port) => write!(f, "{host}{port}"),
|
||||
Self::Literal(addr) => write!(f, "{addr}"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue