pijul nest
guest [sign in]

use default type parameter instead of newtype

[?]
9FZSPF6U3oQmpTwxvCnadrHKQEqTkEpnrDg1UWw9Zo9E
Oct 26, 2021, 12:28 AM
O4PSZ7TQINXL4PQI3ZHAAY2A2EDNJLDB7F7CZI7IQHT7DQ6W2UXQC

Dependencies

  • [2] FREPDP7B add simple parametric rc impl
  • [3] NW4S4ZCC rename MutTxn to GenericMutTxn
  • [4] YDHYZA77 Adding the RootPage trait to access the raw bytes of a root page (needed in libpijul)
  • [5] W2MIZD5B Single file databases + CRC for the root pages (checking the other pages makes everything very slow)
  • [6] OP6SVMOD Resetting history
  • [7] YWFYZNLZ Cleanup + inter-process concurrency
  • [8] ECPAFJSB add env_borrow for Txn and MutTxn
  • [9] WS4ZQM4R Debugging, tests, etc.
  • [10] E4MD6T3L Proofreading and commenting of this crate (massive bug fixes included)
  • [11] TJ2R4HAZ Accessing the root pages (unsafely, of course)
  • [12] EDTFMMZW add dummy RcEntry trait for rc tree key
  • [13] FFERM7K5 add type alias with default rc impl
  • [14] SO25TWFL A few features for integrating it into Pijul
  • [15] YXKP4AIW New file locks, with multiple sets of free pages
  • [16] KMT3MF5N Drop a database
  • [17] YATBB4O7 run cargo fmt

Change contents

  • replacement in "sanakirja/src/lib.rs" at line 107
    [3.2997][3.0:82]()
    pub use environment::{Commit, Env, GenericMutTxn, MutTxn, RootDb, RootPage, Txn};
    [3.2997]
    [3.2267]
    pub use environment::{Commit, Env, MutTxn, RootDb, RootPage, Txn};
  • replacement in "sanakirja/src/environment/muttxn.rs" at line 5
    [3.80263][3.0:81]()
    impl<E: Borrow<Env>, T, R: RcEntry> std::fmt::Debug for GenericMutTxn<E, T, R> {
    [3.80263]
    [3.37172]
    impl<E: Borrow<Env>, T, R: RcEntry> std::fmt::Debug for MutTxn<E, T, R> {
  • edit in "sanakirja/src/environment/muttxn.rs" at line 32
    [2.413][2.413:531](),[3.107][3.37287:37288](),[3.119][3.37287:37288](),[3.147][3.37287:37288](),[2.531][3.37287:37288](),[3.37287][3.37287:37288]()
    /// A mutable transaction using 12 bits for the reference counting.
    pub type MutTxn<E, T> = GenericMutTxn<E, T, u64>;
  • replacement in "sanakirja/src/environment/muttxn.rs" at line 33
    [3.80290][3.108:166]()
    pub struct GenericMutTxn<E: Borrow<Env>, T, R: RcEntry> {
    [3.80290]
    [3.2751]
    pub struct MutTxn<E: Borrow<Env>, T, R: RcEntry = u64> {
  • replacement in "sanakirja/src/environment/muttxn.rs" at line 72
    [3.80903][3.167:228]()
    impl<E: Borrow<Env>, T, R: RcEntry> GenericMutTxn<E, T, R> {
    [3.80903]
    [3.2393]
    impl<E: Borrow<Env>, T, R: RcEntry> MutTxn<E, T, R> {
  • replacement in "sanakirja/src/environment/muttxn.rs" at line 81
    [3.7735][3.229:299]()
    impl<E: Borrow<Env>, T, R: RcEntry> Drop for GenericMutTxn<E, T, R> {
    [3.7735]
    [3.80962]
    impl<E: Borrow<Env>, T, R: RcEntry> Drop for MutTxn<E, T, R> {
  • replacement in "sanakirja/src/environment/muttxn.rs" at line 103
    [3.8146][2.532:641]()
    impl<'a, E: Borrow<Env>, T, R: RcEntry> Commit
    for GenericMutTxn<E, &'a mut GenericMutTxn<E, T, R>, R>
    {
    [3.8146]
    [3.37309]
    impl<'a, E: Borrow<Env>, T, R: RcEntry> Commit for MutTxn<E, &'a mut MutTxn<E, T, R>, R> {
  • replacement in "sanakirja/src/environment/muttxn.rs" at line 168
    [3.82078][2.642:697]()
    pub fn mut_txn_begin<E: Borrow<Self>, R: RcEntry>(
    [3.82078]
    [2.697]
    pub fn mut_txn_begin<E: Borrow<Self>>(env: E) -> Result<MutTxn<E, ()>, Error> {
    Self::mut_txn_begin_generic_rc(env)
    }
    /// Start a mutable transaction. Mutable transactions that go out
    /// of scope are automatically aborted.
    pub fn mut_txn_begin_generic_rc<E: Borrow<Self>, R: RcEntry>(
  • replacement in "sanakirja/src/environment/muttxn.rs" at line 176
    [2.713][2.713:763]()
    ) -> Result<GenericMutTxn<E, (), R>, Error> {
    [2.713]
    [3.82162]
    ) -> Result<MutTxn<E, (), R>, Error> {
  • replacement in "sanakirja/src/environment/muttxn.rs" at line 207
    [3.10473][3.513:544]()
    Ok(GenericMutTxn {
    [3.10473]
    [3.83562]
    Ok(MutTxn {
  • replacement in "sanakirja/src/environment/muttxn.rs" at line 241
    [3.3232][3.545:615]()
    impl<E: Borrow<Env>, R: RcEntry> Commit for GenericMutTxn<E, (), R> {
    [3.3232]
    [3.84119]
    impl<E: Borrow<Env>, R: RcEntry> Commit for MutTxn<E, (), R> {
  • replacement in "sanakirja/src/environment/muttxn.rs" at line 365
    [3.86004][3.616:677]()
    impl<E: Borrow<Env>, T, R: RcEntry> GenericMutTxn<E, T, R> {
    [3.86004]
    [3.15482]
    impl<E: Borrow<Env>, T, R: RcEntry> MutTxn<E, T, R> {
  • replacement in "sanakirja/src/environment/muttxn.rs" at line 476
    [3.87011][3.678:769]()
    impl<E: Borrow<Env>, T, R: RcEntry> sanakirja_core::AllocPage for GenericMutTxn<E, T, R> {
    [3.87011]
    [3.87091]
    impl<E: Borrow<Env>, T, R: RcEntry> sanakirja_core::AllocPage for MutTxn<E, T, R> {
  • replacement in "sanakirja/src/environment/muttxn.rs" at line 559
    [3.19838][3.770:831]()
    impl<E: Borrow<Env>, A, R: RcEntry> GenericMutTxn<E, A, R> {
    [3.19838]
    [3.19877]
    impl<E: Borrow<Env>, A, R: RcEntry> MutTxn<E, A, R> {
  • replacement in "sanakirja/src/environment/muttxn.rs" at line 624
    [3.90733][3.832:922]()
    impl<E: Borrow<Env>, A, R: RcEntry> sanakirja_core::LoadPage for GenericMutTxn<E, A, R> {
    [3.90733]
    [3.20953]
    impl<E: Borrow<Env>, A, R: RcEntry> sanakirja_core::LoadPage for MutTxn<E, A, R> {
  • replacement in "sanakirja/src/environment/muttxn.rs" at line 649
    [3.4392][3.923:997]()
    impl<E: Borrow<Env>, T, R: RcEntry> RootPage for GenericMutTxn<E, T, R> {
    [3.4392]
    [3.120]
    impl<E: Borrow<Env>, T, R: RcEntry> RootPage for MutTxn<E, T, R> {
  • replacement in "sanakirja/src/environment/muttxn.rs" at line 658
    [3.367][3.998:1059]()
    impl<E: Borrow<Env>, T, R: RcEntry> GenericMutTxn<E, T, R> {
    [3.367]
    [3.21017]
    impl<E: Borrow<Env>, T, R: RcEntry> MutTxn<E, T, R> {
  • replacement in "sanakirja/src/environment/muttxn.rs" at line 684
    [3.21349][3.1060:1132]()
    impl<E: Borrow<Env>, T, R: RcEntry> RootDb for GenericMutTxn<E, T, R> {
    [3.21349]
    [3.21399]
    impl<E: Borrow<Env>, T, R: RcEntry> RootDb for MutTxn<E, T, R> {