diff options
| author | Kirill Chibisov <contact@kchibisov.com> | 2025-07-01 23:52:08 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-01 23:52:08 +0900 |
| commit | 2d79edab16fecfa1ce352c86c9698d078dbbb7d4 (patch) | |
| tree | 6bf1542e3bb003cbcf1d995e1e424c3e60e0011d /alacritty/src/config | |
| parent | 3ea13aeadcfab1515367fb5e5ed5e2494b25b9a2 (diff) | |
| download | r-alacritty-2d79edab16fecfa1ce352c86c9698d078dbbb7d4.tar.gz r-alacritty-2d79edab16fecfa1ce352c86c9698d078dbbb7d4.tar.bz2 r-alacritty-2d79edab16fecfa1ce352c86c9698d078dbbb7d4.zip | |
Remove cstr! macro in favor of literal notation
Also apply clippy changes while at it.
Closes #8002.
Diffstat (limited to 'alacritty/src/config')
| -rw-r--r-- | alacritty/src/config/mod.rs | 8 | ||||
| -rw-r--r-- | alacritty/src/config/monitor.rs | 8 | ||||
| -rw-r--r-- | alacritty/src/config/ui_config.rs | 6 | ||||
| -rw-r--r-- | alacritty/src/config/window.rs | 9 |
4 files changed, 14 insertions, 17 deletions
diff --git a/alacritty/src/config/mod.rs b/alacritty/src/config/mod.rs index 77baf533..db57c102 100644 --- a/alacritty/src/config/mod.rs +++ b/alacritty/src/config/mod.rs @@ -148,7 +148,7 @@ pub fn load(options: &mut Options) -> UiConfig { /// Attempt to reload the configuration file. pub fn reload(config_path: &Path, options: &mut Options) -> Result<UiConfig> { - debug!("Reloading configuration file: {:?}", config_path); + debug!("Reloading configuration file: {config_path:?}"); // Load config, propagating errors. let mut config = load_from(config_path)?; @@ -169,11 +169,11 @@ fn load_from(path: &Path) -> Result<UiConfig> { match read_config(path) { Ok(config) => Ok(config), Err(Error::Io(io)) if io.kind() == io::ErrorKind::NotFound => { - error!(target: LOG_TARGET_CONFIG, "Unable to load config {:?}: File not found", path); + error!(target: LOG_TARGET_CONFIG, "Unable to load config {path:?}: File not found"); Err(Error::Io(io)) }, Err(err) => { - error!(target: LOG_TARGET_CONFIG, "Unable to load config {:?}: {}", path, err); + error!(target: LOG_TARGET_CONFIG, "Unable to load config {path:?}: {err}"); Err(err) }, } @@ -268,7 +268,7 @@ fn load_imports( continue; }, Err(err) => { - error!(target: LOG_TARGET_CONFIG, "Unable to import config {:?}: {}", path, err) + error!(target: LOG_TARGET_CONFIG, "Unable to import config {path:?}: {err}") }, } } diff --git a/alacritty/src/config/monitor.rs b/alacritty/src/config/monitor.rs index 48271baf..b4ea361f 100644 --- a/alacritty/src/config/monitor.rs +++ b/alacritty/src/config/monitor.rs @@ -63,7 +63,7 @@ impl ConfigMonitor { ) { Ok(watcher) => watcher, Err(err) => { - error!("Unable to watch config file: {}", err); + error!("Unable to watch config file: {err}"); return None; }, }; @@ -84,7 +84,7 @@ impl ConfigMonitor { // Watch all configuration file directories. for parent in &parents { if let Err(err) = watcher.watch(parent, RecursiveMode::NonRecursive) { - debug!("Unable to watch config directory {:?}: {}", parent, err); + debug!("Unable to watch config directory {parent:?}: {err}"); } } @@ -135,10 +135,10 @@ impl ConfigMonitor { } }, Ok(Err(err)) => { - debug!("Config watcher errors: {:?}", err); + debug!("Config watcher errors: {err:?}"); }, Err(err) => { - debug!("Config watcher channel dropped unexpectedly: {}", err); + debug!("Config watcher channel dropped unexpectedly: {err}"); break; }, }; diff --git a/alacritty/src/config/ui_config.rs b/alacritty/src/config/ui_config.rs index 0e240622..a10fe1cf 100644 --- a/alacritty/src/config/ui_config.rs +++ b/alacritty/src/config/ui_config.rs @@ -205,7 +205,7 @@ where match Binding::<T>::deserialize(value) { Ok(binding) => bindings.push(binding), Err(err) => { - error!(target: LOG_TARGET_CONFIG, "Config error: {}; ignoring binding", err); + error!(target: LOG_TARGET_CONFIG, "Config error: {err}; ignoring binding"); }, } } @@ -410,7 +410,7 @@ impl<'de> Deserialize<'de> for HintContent { Err(err) => { error!( target: LOG_TARGET_CONFIG, - "Config error: hint's regex: {}", err + "Config error: hint's regex: {err}" ); }, }, @@ -419,7 +419,7 @@ impl<'de> Deserialize<'de> for HintContent { Err(err) => { error!( target: LOG_TARGET_CONFIG, - "Config error: hint's hyperlinks: {}", err + "Config error: hint's hyperlinks: {err}" ); }, }, diff --git a/alacritty/src/config/window.rs b/alacritty/src/config/window.rs index e6a2ad22..a116bec6 100644 --- a/alacritty/src/config/window.rs +++ b/alacritty/src/config/window.rs @@ -110,10 +110,7 @@ impl WindowConfig { warn!( target: LOG_TARGET_CONFIG, "Both `lines` and `columns` must be non-zero for `window.dimensions` to take \ - effect. Configured value of `{}` is 0 while that of `{}` is {}", - zero_key, - non_zero_key, - non_zero_value, + effect. Configured value of `{zero_key}` is 0 while that of `{non_zero_key}` is {non_zero_value}", ); None @@ -255,7 +252,7 @@ impl<'de> Deserialize<'de> for Class { Err(err) => { error!( target: LOG_TARGET_CONFIG, - "Config error: class.instance: {}", err + "Config error: class.instance: {err}" ); }, }, @@ -264,7 +261,7 @@ impl<'de> Deserialize<'de> for Class { Err(err) => { error!( target: LOG_TARGET_CONFIG, - "Config error: class.instance: {}", err + "Config error: class.instance: {err}" ); }, }, |