diff --git a/Cargo.toml b/Cargo.toml index 4f074b3..3709b12 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,6 +8,7 @@ version = "0.14.3" authors = ["Niko Matsakis "] readme = "README.md" keywords = ["unification", "union-find"] +edition = "2021" [features] bench = [ ] diff --git a/src/snapshot_vec.rs b/src/snapshot_vec.rs index efde49a..4ed298c 100644 --- a/src/snapshot_vec.rs +++ b/src/snapshot_vec.rs @@ -26,7 +26,7 @@ use std::marker::PhantomData; use std::mem; use std::ops; -use undo_log::{Rollback, Snapshots, UndoLogs, VecLog}; +use crate::undo_log::{Rollback, Snapshots, UndoLogs, VecLog}; #[derive(Debug)] pub enum UndoLog { @@ -132,7 +132,7 @@ where } // Snapshots are tokens that should be created/consumed linearly. -pub struct Snapshot { +pub struct Snapshot { pub(crate) value_count: usize, snapshot: S, } diff --git a/src/unify/backing_vec.rs b/src/unify/backing_vec.rs index 7c1eb2c..56e4caf 100644 --- a/src/unify/backing_vec.rs +++ b/src/unify/backing_vec.rs @@ -1,10 +1,10 @@ +use crate::snapshot_vec as sv; #[cfg(feature = "persistent")] use dogged::DVec; -use snapshot_vec as sv; use std::marker::PhantomData; use std::ops::{self, Range}; -use undo_log::{Rollback, Snapshots, UndoLogs, VecLog}; +use crate::undo_log::{Rollback, Snapshots, UndoLogs, VecLog}; use super::{UnifyKey, UnifyValue, VarValue}; diff --git a/src/unify/mod.rs b/src/unify/mod.rs index 41c9d46..79f5370 100644 --- a/src/unify/mod.rs +++ b/src/unify/mod.rs @@ -35,8 +35,8 @@ use std::fmt::Debug; use std::marker; use std::ops::Range; -use snapshot_vec::{self as sv, UndoLog}; -use undo_log::{UndoLogs, VecLog}; +use crate::snapshot_vec::{self as sv, UndoLog}; +use crate::undo_log::{UndoLogs, VecLog}; mod backing_vec; pub use self::backing_vec::{ diff --git a/src/unify/tests.rs b/src/unify/tests.rs index 5665aba..3817726 100644 --- a/src/unify/tests.rs +++ b/src/unify/tests.rs @@ -16,11 +16,11 @@ extern crate test; #[cfg(feature = "bench")] use self::test::Bencher; +use crate::unify::{EqUnifyValue, InPlace, InPlaceUnificationTable, NoError, UnifyKey, UnifyValue}; +use crate::unify::{UnificationStore, UnificationTable}; use std::cmp; #[cfg(feature = "persistent")] use unify::Persistent; -use unify::{EqUnifyValue, InPlace, InPlaceUnificationTable, NoError, UnifyKey, UnifyValue}; -use unify::{UnificationStore, UnificationTable}; #[derive(Copy, Clone, Debug, Hash, PartialEq, Eq)] struct UnitKey(u32);