aboutsummaryrefslogtreecommitdiff
path: root/derive/src/network/maplist.rs
diff options
context:
space:
mode:
authorMax Audron <audron@cocaine.farm>2023-12-19 19:46:37 +0100
committerMax Audron <audron@cocaine.farm>2023-12-19 19:46:37 +0100
commit3c0cad7d32c65a1e7d6272714c65deb65d07b92c (patch)
treee10067471b66efbeb0082e8fc05367557b86c552 /derive/src/network/maplist.rs
parentimplement bufferviewmanager/config init (diff)
decromulate ignorelistmanager i32 type impl and derive
this was for whatever reason pretty confusing, but there is no need to impl the Network trait here, we should instead be using From impls for going to the Variant and i32 directly. That way the code becomes cleaner and we don't have to worry about these conversions anymore.
Diffstat (limited to '')
-rw-r--r--derive/src/network/maplist.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/derive/src/network/maplist.rs b/derive/src/network/maplist.rs
index 94eb04b..19877cb 100644
--- a/derive/src/network/maplist.rs
+++ b/derive/src/network/maplist.rs
@@ -77,7 +77,7 @@ pub(crate) fn to_vec(_type_name: &Ident, fields: &Vec<NetworkField>) -> TokenStr
}
} else {
quote! {
- item.#field_name.clone()
+ item.#field_name.clone().into()
}
};
@@ -147,7 +147,7 @@ pub(crate) fn from(fields: &Vec<NetworkField>) -> Vec<TokenStream> {
let field_inner = if field.network {
quote! {
- libquassel::message::Network::from_network(&mut std::convert::TryInto::try_into(input.remove(0)).unwrap())
+ libquassel::message::NetworkList::from_network_list(&mut std::convert::TryInto::try_into(input.remove(0)).unwrap())
}
} else {
quote! {
@@ -202,7 +202,7 @@ pub(crate) fn from_vec(type_name: &Ident, fields: &Vec<NetworkField>, new: bool)
}
} else {
quote! {
- #type_name::from_network(input)
+ #type_name::from_network_list(input)
}
};
commit/src/primitive/variant.rs?id=8b50c49e2476bcce5b13b1e604a4bcca22eab3ff&follow=1'>Use BufferId in BufferInfoTobias Deiminger-10/+11 2025-02-25Use BufferId in VariantTobias Deiminger-2/+33 2025-02-25Add BufferId as Rust typeTobias Deiminger-0/+39 2025-02-25Use MsgId in MessageTobias Deiminger-18/+6 2025-02-25Use MsgId in VariantTobias Deiminger-20/+37 2025-02-25Add MsgId as Rust typeTobias Deiminger-0/+56 2025-02-24added session manager comments and log messageMax Audron-1/+3 2025-02-23add identity syncable to SessionManagerMax Audron-1/+8 2025-02-23add syncables for IrcUserMax Audron-2/+53 2025-02-23move network config to it's own file and impl it's syncMax Audron-23/+84 2025-02-23add basic network syncablesMax Audron-39/+420 2025-02-23clean up unused_import and unused_variables a bitMax Audron-2/+8 2025-02-23fix server feature errorsMax Audron-28/+23 2025-02-23fix ircchannel and maplist network representationMax Audron-154/+137 2025-02-22replace deprecated failure crate with thiserrorMax Audron-278/+194 2025-02-22update dependencies and fix errorsMax Audron-508/+332 2025-02-22update flakeMax Audron-94/+117 2024-05-22add todos to readmeMax Audron-16/+35