mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2025-12-11 20:15:30 +01:00
cargo fmt + fix clippy lints
This commit is contained in:
parent
851778b2ab
commit
19017d1001
@ -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.
|
/// 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 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.
|
/// 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 {
|
pub enum ConnectionType {
|
||||||
/// I am the QUIC server.
|
/// I am the QUIC server.
|
||||||
Server,
|
Server,
|
||||||
|
|||||||
@ -13,8 +13,7 @@ fn main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Replace 'generate_simple_self_signed' with full code so we have full control over generated certificate.
|
// TODO: Replace 'generate_simple_self_signed' with full code so we have full control over generated certificate.
|
||||||
let cert =
|
let cert = generate_simple_self_signed(vec!["sdtunnel.spacedrive.com".into()]).unwrap();
|
||||||
generate_simple_self_signed(vec!["sdtunnel.spacedrive.com".into()]).unwrap();
|
|
||||||
|
|
||||||
match fs::write(
|
match fs::write(
|
||||||
env_file,
|
env_file,
|
||||||
@ -26,7 +25,7 @@ SD_REDIS_URL=redis://127.0.0.1/"#,
|
|||||||
encode(cert.serialize_private_key_der())
|
encode(cert.serialize_private_key_der())
|
||||||
),
|
),
|
||||||
) {
|
) {
|
||||||
Ok(_) => {},
|
Ok(_) => {}
|
||||||
Err(err) => println!("Error writing to '{}': {}", env_file.display(), err),
|
Err(err) => println!("Error writing to '{}': {}", env_file.display(), err),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user