mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-20 15:35:29 +01:00
clippy
This commit is contained in:
@@ -985,7 +985,7 @@ impl Pager {
|
||||
) -> Result<IOResult<PagerCommitResult>> {
|
||||
let mut checkpoint_result = CheckpointResult::default();
|
||||
let res = loop {
|
||||
let state = self.commit_info.borrow().state.clone();
|
||||
let state = self.commit_info.borrow().state;
|
||||
trace!(?state);
|
||||
match state {
|
||||
CommitState::Start => {
|
||||
@@ -1014,10 +1014,12 @@ impl Pager {
|
||||
let page = {
|
||||
let mut cache = self.page_cache.write();
|
||||
let page_key = PageCacheKey::new(page_id);
|
||||
let page = cache.get(&page_key).expect(&format!(
|
||||
"we somehow added a page to dirty list but we didn't mark it as dirty, causing cache to drop it. page={}",
|
||||
page_id
|
||||
));
|
||||
let page = cache.get(&page_key).unwrap_or_else(|| {
|
||||
panic!(
|
||||
"we somehow added a page to dirty list but we didn't mark it as dirty, causing cache to drop it. page={}",
|
||||
page_id
|
||||
)
|
||||
});
|
||||
let page_type = page.get().contents.as_ref().unwrap().maybe_page_type();
|
||||
trace!(
|
||||
"commit_dirty_pages(page={}, page_type={:?}",
|
||||
|
||||
Reference in New Issue
Block a user