@@ -840,7 +840,7 @@ impl PageCache {
840840 // changing.
841841 let ts = old. ts ( ) + 1 ;
842842
843- let cache_info = CacheInfo { lsn , pointer , ts } ;
843+ let cache_info = CacheInfo { ts , lsn , pointer } ;
844844
845845 let mut new_cache_infos =
846846 Vec :: with_capacity ( old. cache_infos . len ( ) + 1 ) ;
@@ -944,13 +944,13 @@ impl PageCache {
944944 ' inner: loop {
945945 let pg_view = self . inner . get ( pid, & guard) ;
946946
947- match & * pg_view. cache_infos {
948- & [ _single_cache_info] => {
947+ match * pg_view. cache_infos {
948+ [ _single_cache_info] => {
949949 let page_state = pg_view. to_page_state ( ) ;
950950 page_states. push ( page_state) ;
951951 break ' inner;
952952 }
953- & [ _first_of_several, ..] => {
953+ [ _first_of_several, ..] => {
954954 // If a page has multiple disk locations,
955955 // rewrite it to a single one before storing
956956 // a single 8-byte pointer to its cold location.
@@ -965,7 +965,7 @@ impl PageCache {
965965 }
966966 continue ' inner;
967967 }
968- & [ ] => {
968+ [ ] => {
969969 // there is a benign race with the thread
970970 // that is allocating this page. the allocating
971971 // thread has not yet written the new page to disk,
@@ -1661,8 +1661,7 @@ impl PageCacheInner {
16611661 "{:?}" ,
16621662 Error :: ReportableBug (
16631663 "failed to retrieve META page \
1664- which should always be present"
1665- . into( ) ,
1664+ which should always be present"
16661665 )
16671666 )
16681667 }
@@ -1684,8 +1683,7 @@ impl PageCacheInner {
16841683 "{:?}" ,
16851684 Error :: ReportableBug (
16861685 "failed to retrieve counter page \
1687- which should always be present"
1688- . into( ) ,
1686+ which should always be present"
16891687 )
16901688 )
16911689 }
@@ -1904,7 +1902,7 @@ impl PageCacheInner {
19041902 if let Some ( root) = m. get_root ( name) {
19051903 Ok ( root)
19061904 } else {
1907- Err ( Error :: CollectionNotFound ( name . into ( ) ) )
1905+ Err ( Error :: CollectionNotFound )
19081906 }
19091907 }
19101908
@@ -1948,8 +1946,7 @@ impl PageCacheInner {
19481946 Err ( None ) => {
19491947 return Err ( Error :: ReportableBug (
19501948 "replacing the META page has failed because \
1951- the pagecache does not think it currently exists."
1952- . into ( ) ,
1949+ the pagecache does not think it currently exists.",
19531950 ) ) ;
19541951 }
19551952 }
@@ -2088,10 +2085,10 @@ impl PageCacheInner {
20882085
20892086 // TODO this feels racy, test it better?
20902087 if let Update :: Free = update {
2091- Err ( Error :: ReportableBug ( format ! (
2092- "non-link/replace found in pull of pid {}" ,
2093- pid
2094- ) ) )
2088+ error ! ( "non-link/replace found in pull of pid {}" , pid ) ;
2089+ Err ( Error :: ReportableBug (
2090+ "non-link/replace found in pull of page fragments" ,
2091+ ) )
20952092 } else {
20962093 Ok ( update)
20972094 }
0 commit comments