mycognosist / solar

A minimal Secure Scuttlebutt replication node.
Other
20 stars 2 forks source link

Replace generic broker message type with enum #80

Closed mycognosist closed 8 months ago

mycognosist commented 8 months ago

The primary change introduced in this PR is the conversion of BrokerMessage from a generic definition (Arc<dyn Any + Send + Sync>) to an enum. While the generic approach is convenient, it requires the message to be downcast each time a match occurs - usually as a reference. The change allows for more compact matching and should also open the door for a refactor of the connection and replication flow (more to come on that in a future PR).

Other minor changes: