1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-11-30 20:50:49 +01:00

clippy fixes

This commit is contained in:
Robin Appelman 2026-11-08 16:42:52 +01:00
commit 9343bc9a61
Signed by: robin
SSH key fingerprint: SHA256:kifqgrqnut7q1YUIrI0AdMNC23qiKAS/T9uGFmIYvbE
5 changed files with 11 additions and 6 deletions

View file

@ -27,7 +27,7 @@ Add the following configuration to the `haze.toml` configuration file:
address = "haze.example.com" # the base domain for the proxy to use
listen = "127.0.0.1:8080" # the port+ip to listen on
# listen = "/var/run/haze/haze.sock" # or a unix socket path
# tray = true # show a system tray item, defaults to false
# tray = false # show a system tray item, enabled by default
```
### Without a reverse proxy

View file

@ -19,7 +19,7 @@ pub async fn clean(docker: &Docker, config: &HazeConfig) -> Result<()> {
}
for cloud in remove {
if let Err(e) = cloud.destroy(&docker, &config).await {
if let Err(e) = cloud.destroy(docker, config).await {
eprintln!("Error while removing cloud: {:#}", e);
}
}

View file

@ -7,8 +7,8 @@ use std::convert::TryFrom;
use std::env::home_dir;
use std::fs::read_to_string;
use std::net::IpAddr;
use toml::Value;
use toml::map::Map;
use toml::Value;
#[derive(Debug, Deserialize, Default)]
#[serde(from = "RawHazeConfig")]
@ -205,10 +205,15 @@ pub struct ProxyConfig {
pub cert: Option<String>,
#[serde(default)]
pub key: Option<String>,
#[serde(default)]
#[serde(default = "default_tray")]
#[cfg_attr(not(feature = "tray"), allow(dead_code))]
pub tray: bool,
}
fn default_tray() -> bool {
true
}
impl ProxyConfig {
/// Get a public address for a service, either with direct IP or through the proxy
pub fn addr(&self, id: &str, ip: IpAddr) -> String {

View file

@ -91,7 +91,7 @@ pub trait ServiceTrait {
#[cfg_attr(not(feature = "tray"), allow(dead_code))]
fn has_web_ui(&self) -> bool {
return false;
false
}
async fn start_message(

View file

@ -196,7 +196,7 @@ impl ServiceTrait for LdapAdmin {
}
fn has_web_ui(&self) -> bool {
return true;
true
}
async fn start_message(