Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/tls.rs')
-rw-r--r--crates/hir-ty/src/tls.rs10
1 files changed, 3 insertions, 7 deletions
diff --git a/crates/hir-ty/src/tls.rs b/crates/hir-ty/src/tls.rs
index 6cb59491fa..b718556c8a 100644
--- a/crates/hir-ty/src/tls.rs
+++ b/crates/hir-ty/src/tls.rs
@@ -5,8 +5,8 @@ use itertools::Itertools;
use span::Edition;
use crate::{
- chalk_db, db::HirDatabase, from_assoc_type_id, from_chalk_trait_id, mapping::from_chalk,
- CallableDefId, Interner, ProjectionTyExt,
+ CallableDefId, Interner, ProjectionTyExt, chalk_db, db::HirDatabase, from_assoc_type_id,
+ from_chalk_trait_id, mapping::from_chalk,
};
use hir_def::{AdtId, ItemContainerId, Lookup, TypeAliasId};
@@ -131,11 +131,7 @@ mod unsafe_tls {
pub(crate) fn with_current_program<R>(
op: impl for<'a> FnOnce(Option<&'a DebugContext<'a>>) -> R,
) -> R {
- if PROGRAM.is_set() {
- PROGRAM.with(|prog| op(Some(prog)))
- } else {
- op(None)
- }
+ if PROGRAM.is_set() { PROGRAM.with(|prog| op(Some(prog))) } else { op(None) }
}
pub(crate) fn set_current_program<OP, R>(p: &dyn HirDatabase, op: OP) -> R