Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to the 2021 edition #58

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ version = "0.14.3"
authors = ["Niko Matsakis <[email protected]>"]
readme = "README.md"
keywords = ["unification", "union-find"]
edition = "2021"

[features]
bench = [ ]
Expand Down
4 changes: 2 additions & 2 deletions src/snapshot_vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<D: SnapshotVecDelegate> {
Expand Down Expand Up @@ -132,7 +132,7 @@ where
}

// Snapshots are tokens that should be created/consumed linearly.
pub struct Snapshot<S = ::undo_log::Snapshot> {
pub struct Snapshot<S = crate::undo_log::Snapshot> {
pub(crate) value_count: usize,
snapshot: S,
}
Expand Down
4 changes: 2 additions & 2 deletions src/unify/backing_vec.rs
Original file line number Diff line number Diff line change
@@ -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};

Expand Down
4 changes: 2 additions & 2 deletions src/unify/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down
4 changes: 2 additions & 2 deletions src/unify/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down