Improved plugin modularity and protocol

This commit is contained in:
2025-12-14 11:03:02 +01:00
parent 51708ac050
commit 4eae3c046d
5 changed files with 28 additions and 68 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ use crate::plugin::types::{LoaderMessage, PluginMessage};
pub struct Plugin(TcpStream, BufReader<TcpStream>);
impl Plugin {
pub fn send(&mut self, m: LoaderMessage) {
pub fn send(&mut self, m: &LoaderMessage) {
self.0
.write(serde_json::to_string(&m).unwrap().as_bytes())
.unwrap();