cargo fmt + fix clippy lints

This commit is contained in:
Oscar Beaumont 2022-10-07 07:39:59 +08:00
parent 851778b2ab
commit 19017d1001
2 changed files with 3 additions and 4 deletions

View File

@ -14,7 +14,7 @@ use crate::{NetworkManager, P2PManager, PeerMetadata};
/// QUIC is a client/server protocol so when doing P2P communication one client will be the server and one will be the client from a QUIC perspective.
/// The protocol is bi-directional so this doesn't matter a huge amount and the P2P library does it's best to hide this detail from the embedding application as thinking about this can be very confusing.
/// The decision for who is the client and server should be treated as arbitrary and shouldn't affect how the protocol operates.
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum ConnectionType {
/// I am the QUIC server.
Server,

View File

@ -13,8 +13,7 @@ fn main() {
}
// TODO: Replace 'generate_simple_self_signed' with full code so we have full control over generated certificate.
let cert =
generate_simple_self_signed(vec!["sdtunnel.spacedrive.com".into()]).unwrap();
let cert = generate_simple_self_signed(vec!["sdtunnel.spacedrive.com".into()]).unwrap();
match fs::write(
env_file,
@ -26,7 +25,7 @@ SD_REDIS_URL=redis://127.0.0.1/"#,
encode(cert.serialize_private_key_der())
),
) {
Ok(_) => {},
Ok(_) => {}
Err(err) => println!("Error writing to '{}': {}", env_file.display(), err),
}