Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions linkup-cli/src/commands/infra/cloudflare/resources.rs
Original file line number Diff line number Diff line change
Expand Up @@ -958,13 +958,13 @@ impl TargetCfResources {
Ok(_) => {
notifier.notify(&format!(
"Tunnel '{}' ({}) deleted",
&tunnel.name, &tunnel.id
tunnel.name, tunnel.id
));
}
Err(_) => {
notifier.notify(&format!(
"Failed to delete tunnel '{}' ({})",
&tunnel.name, &tunnel.id
tunnel.name, tunnel.id
));
}
}
Expand Down
2 changes: 1 addition & 1 deletion linkup-cli/src/commands/start.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ fn set_service_env(directory: String, config_path: String) -> Result<()> {
let service_path = PathBuf::from(config_dir).join(&directory);

let dev_env_files: Vec<_> = fs::read_dir(&service_path)
.with_context(|| format!("Failed to read service directory {:?}", &service_path))?
.with_context(|| format!("Failed to read service directory {:?}", service_path))?
.filter_map(Result::ok)
.filter(|entry| {
entry.file_name().to_string_lossy().ends_with(".linkup")
Expand Down
2 changes: 1 addition & 1 deletion linkup-cli/src/commands/stop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ fn remove_service_env(directory: String, config_path: String) -> Result<()> {
let service_path = PathBuf::from(config_dir).join(&directory);

let env_files: Vec<_> = fs::read_dir(&service_path)
.with_context(|| format!("Failed to read service directory {:?}", &service_path))?
.with_context(|| format!("Failed to read service directory {:?}", service_path))?
.filter_map(Result::ok)
.filter(|entry| entry.file_name().to_string_lossy().starts_with(".env"))
.collect();
Expand Down
4 changes: 2 additions & 2 deletions linkup-cli/src/commands/uninstall.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub async fn uninstall(_args: &Args, config_arg: Option<&Path>) -> Result<()> {

let exe_path = linkup_exe_path()?;

log::debug!("Linkup exe path: {:?}", &exe_path);
log::debug!("Linkup exe path: {:?}", exe_path);
match InstallationMethod::current()? {
InstallationMethod::Brew => {
log::debug!("Uninstalling linkup from Homebrew");
Expand Down Expand Up @@ -58,7 +58,7 @@ pub async fn uninstall(_args: &Args, config_arg: Option<&Path>) -> Result<()> {
#[cfg(target_os = "linux")]
{
println!("Linkup needs sudo access to:");
println!(" - Remove binary from {:?}", &exe_path);
println!(" - Remove binary from {:?}", exe_path);

if !is_sudo() {
sudo_su()?;
Expand Down
10 changes: 5 additions & 5 deletions linkup-cli/src/commands/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ pub async fn update(args: &Args) -> Result<()> {

println!(
"Updating from version '{}' ({}) to '{}' ({})...",
&current_version,
&current_version.channel(),
&update.version,
&update.version.channel()
current_version,
current_version.channel(),
update.version,
update.version.channel()
);

let new_linkup_path = update
Expand All @@ -68,7 +68,7 @@ pub async fn update(args: &Args) -> Result<()> {
#[cfg(target_os = "linux")]
{
println!("Linkup needs sudo access to:");
println!(" - Update binary in {:?}", &current_linkup_path);
println!(" - Update binary in {:?}", current_linkup_path);
println!(" - Add capability to bind to port 80/443");

if !is_sudo() {
Expand Down
2 changes: 1 addition & 1 deletion linkup-cli/src/release.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ mod github {
"Linkup release for OS '{}' and ARCH '{}' not found on version {}",
lookup_os,
arch,
&self.version
self.version
);
}

Expand Down
4 changes: 2 additions & 2 deletions local-server/src/certificates/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ pub fn create_domain_cert(certs_dir: &Path, domain: &str) -> (Certificate, KeyPa
let cert = params.signed_by(&key_pair, &issuer).unwrap();

let escaped_domain = domain.replace("*", "wildcard_");
let cert_path = certs_dir.join(format!("{}.cert.pem", &escaped_domain));
let key_path = certs_dir.join(format!("{}.key.pem", &escaped_domain));
let cert_path = certs_dir.join(format!("{}.cert.pem", escaped_domain));
let key_path = certs_dir.join(format!("{}.key.pem", escaped_domain));
fs::write(cert_path, cert.pem()).unwrap();
fs::write(key_path, key_pair.serialize_pem()).unwrap();

Expand Down
6 changes: 3 additions & 3 deletions local-server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ async fn start_server_https(server_state: ServerState) {
Err(error) => {
eprintln!(
"Failed to load certificates from {:?} into SNI: {}",
&server_state.https_certs_dir, error
server_state.https_certs_dir, error
);
return;
}
Expand All @@ -118,7 +118,7 @@ async fn start_server_https(server_state: ServerState) {
let app = router(server_state);

let addr = SocketAddr::from(([0, 0, 0, 0], 443));
println!("HTTPS listening on {}", &addr);
println!("HTTPS listening on {}", addr);

axum_server::bind_rustls(addr, RustlsConfig::from_config(Arc::new(server_config)))
.serve(app.into_make_service())
Expand All @@ -130,7 +130,7 @@ async fn start_server_http(server_state: ServerState) {
let app = router(server_state);

let addr = SocketAddr::from(([0, 0, 0, 0], 80));
println!("HTTP listening on {}", &addr);
println!("HTTP listening on {}", addr);

let listener = tokio::net::TcpListener::bind(addr)
.await
Expand Down
2 changes: 1 addition & 1 deletion worker/src/tunnel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ async fn create_tunnel(
let tunnel_data = TunnelData {
account_id: account_id.to_string(),
name: tunnel_name.to_string(),
url: format!("https://{}.{}", &tunnel_name, &zone.name),
url: format!("https://{}.{}", tunnel_name, zone.name),
id: tunnel.id.to_string(),
secret: tunnel_secret,
last_started: worker::Date::now().as_millis(),
Expand Down
Loading