Revert "refactor: profile switch (#5197)"

This reverts commit c2dcd86722.
This commit is contained in:
Tunglies
2025-10-30 18:11:04 +08:00
parent 928f226d10
commit a869dbb441
36 changed files with 1257 additions and 5894 deletions

View File

@@ -68,13 +68,6 @@ impl<T: Clone + ToOwned> Draft<Box<T>> {
})
}
/// 尝试获取最新只读视图,若当前持有写锁则返回 `None`
pub fn try_latest_ref(&self) -> Option<MappedRwLockReadGuard<'_, Box<T>>> {
self.inner
.try_read()
.map(|guard| RwLockReadGuard::map(guard, |inner| inner.1.as_ref().unwrap_or(&inner.0)))
}
/// 提交草稿,返回旧正式数据
pub fn apply(&self) -> Option<Box<T>> {
let mut inner = self.inner.write();