Skip to content

Commit b100968

Browse files
committed
fmt: cargo
1 parent 8023817 commit b100968

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed

src/context/backend_configuration.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,16 @@ impl BackendConfig {
119119
let config: Self = toml::from_str(s)?;
120120
let major_version = config.glass_easel_backend_config.major_version;
121121
if major_version < 1 {
122-
log::warn!("This backend configuration may be problematic. Please check the updates of it.");
122+
log::warn!(
123+
"This backend configuration may be problematic. Please check the updates of it."
124+
);
123125
} else if major_version > 1 {
124126
Err(anyhow::Error::msg("The backend configuration is designed for a later version of glass-easel-analyzer."))?;
125127
}
126-
log::info!("Loaded backend configuration: {}", config.glass_easel_backend_config.name);
128+
log::info!(
129+
"Loaded backend configuration: {}",
130+
config.glass_easel_backend_config.name
131+
);
127132
Ok(config)
128133
}
129134

src/lib.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,9 @@ async fn serve() -> anyhow::Result<()> {
453453
.sender
454454
.send(generate_notification(
455455
"glassEaselAnalyzer/templateBackendConfig",
456-
TemplateBackendConfigInfo { content: template_backend_config },
456+
TemplateBackendConfigInfo {
457+
content: template_backend_config,
458+
},
457459
))
458460
.unwrap();
459461
for project in projects.iter() {
@@ -545,7 +547,9 @@ async fn serve() -> anyhow::Result<()> {
545547
false
546548
};
547549
sender.send(msg).unwrap();
548-
if need_exit { break; }
550+
if need_exit {
551+
break;
552+
}
549553
}
550554
})
551555
};

src/logger.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::sync::{LazyLock, RwLock, Mutex};
1+
use std::sync::{LazyLock, Mutex, RwLock};
22

33
use log::Log;
44
use lsp_types::{LogMessageParams, MessageType, SetTraceParams, ShowMessageParams, TraceValue};
@@ -27,7 +27,9 @@ impl GlobalLspLogger {
2727
let old = std::mem::replace(&mut *inner, LspLoggerKind::Normal(logger));
2828
match old {
2929
LspLoggerKind::Cache(cache) => {
30-
let LspLoggerKind::Normal(inner) = &*inner else { unreachable!() };
30+
let LspLoggerKind::Normal(inner) = &*inner else {
31+
unreachable!()
32+
};
3133
for log_message in cache.lock().unwrap().drain(..) {
3234
inner.log(log_message);
3335
}

0 commit comments

Comments
 (0)