meta: cargo update & fmt

pull/92/head
Jake McGinty 2021-05-21 13:35:52 +09:00
parent b4fb9f9250
commit fed0c859c8
3 changed files with 13 additions and 10 deletions

8
Cargo.lock generated
View File

@ -323,9 +323,9 @@ dependencies = [
[[package]]
name = "getrandom"
version = "0.2.2"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8"
checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753"
dependencies = [
"cfg-if",
"libc",
@ -728,9 +728,9 @@ dependencies = [
[[package]]
name = "proc-macro2"
version = "1.0.26"
version = "1.0.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a152013215dca273577e18d2bf00fa862b89b24169fb78c4c95aeb07992c9cec"
checksum = "f0d8caf72986c1a598726adc988bb5984792ef84f5ee5aa50209145ee8077038"
dependencies = [
"unicode-xid",
]

View File

@ -362,9 +362,7 @@ fn redeem_invite(
target_conf.to_string_lossy().yellow()
);
log::info!(
"Changing keys and waiting for server's WireGuard interface to transition.",
);
log::info!("Changing keys and waiting for server's WireGuard interface to transition.",);
DeviceUpdate::new()
.set_private_key(keypair.private)
.apply(&iface, network.backend)?;

View File

@ -6,7 +6,9 @@ use ipnetwork::IpNetwork;
use parking_lot::{Mutex, RwLock};
use rusqlite::Connection;
use serde::{Deserialize, Serialize};
use shared::{AddCidrOpts, DeleteCidrOpts, AddPeerOpts, IoErrorContext, NetworkOpt, INNERNET_PUBKEY_HEADER};
use shared::{
AddCidrOpts, AddPeerOpts, DeleteCidrOpts, IoErrorContext, NetworkOpt, INNERNET_PUBKEY_HEADER,
};
use std::{
collections::{HashMap, VecDeque},
convert::TryInto,
@ -93,7 +95,6 @@ enum Command {
#[structopt(flatten)]
args: DeleteCidrOpts,
},
}
pub type Db = Arc<Mutex<Connection>>;
@ -327,7 +328,11 @@ fn add_cidr(
Ok(())
}
fn delete_cidr(interface: &InterfaceName, conf: &ServerConfig, args: DeleteCidrOpts) -> Result<(), Error> {
fn delete_cidr(
interface: &InterfaceName,
conf: &ServerConfig,
args: DeleteCidrOpts,
) -> Result<(), Error> {
println!("Fetching eligible CIDRs");
let conn = open_database_connection(interface, conf)?;
let cidrs = DatabaseCidr::list(&conn)?;