Kestrel 2 жил өмнө
parent
commit
0871265181

+ 3 - 1
src/fleck_core/crypto.rs

@@ -190,7 +190,9 @@ impl EncryptionService {
             log::trace!("sending KeyExchange message");
             self.api.queue::<fleck_core::SendPacketChannel>(
                 fleck_core::msg::Message::build(KeyExchange {
-                    pubkey: self.api.with_service(|ns: &fleck_core::NodeService| ns.self_node().pubkey().clone()),
+                    pubkey: self.api.with_service(|ns: &fleck_core::NodeService| {
+                        *ns.self_node().pubkey()
+                    }),
                     key: x25519_dalek::PublicKey::from(&secret),
                 })
                 .with_peer(with.clone()),

+ 2 - 1
src/fleck_core/io.rs

@@ -2,7 +2,8 @@ use std::{
     cell::{Cell, RefCell},
     collections::HashMap,
     os::unix::prelude::RawFd,
-    rc::Rc, time::Duration,
+    rc::Rc,
+    time::Duration,
 };
 
 use crate::prelude::*;