Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Ranadeep Biswas
dbcop
Commits
da5b7323
Commit
da5b7323
authored
Mar 07, 2019
by
Ranadeep Biswas
Browse files
cargo fmt + clippy
parent
5f23e9c5
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/consistency/algo.rs
View file @
da5b7323
...
...
@@ -28,8 +28,8 @@ impl AtomicHistoryPO {
let
v
:
Vec
<
_
>
=
n_sizes
.iter
()
.enumerate
()
.filter_map
(|(
node_i
,
node_len
)|
{
if
node_len
>
&
0
{
.filter_map
(|(
node_i
,
&
node_len
)|
{
if
node_len
>
0
{
Some
((
node_i
+
1
,
0
))
}
else
{
None
...
...
@@ -172,7 +172,7 @@ impl ConstrainedLinearization for PrefixConsistentHistory {
.or_insert_with
(
Default
::
default
)
.remove
(
&
curr_txn
.0
));
}
self
.active_write
.retain
(|
_
,
ts
|
ts
.
len
()
>
0
);
self
.active_write
.retain
(|
_
,
ts
|
!
ts
.
is_empty
()
);
}
}
...
...
@@ -288,7 +288,7 @@ impl ConstrainedLinearization for SnapshotIsolationHistory {
.entry
(
x
)
.or_insert_with
(
Default
::
default
)
.remove
(
&
curr_txn
.0
));
self
.active_write
.retain
(|
_
,
ts
|
ts
.
len
()
>
0
);
self
.active_write
.retain
(|
_
,
ts
|
!
ts
.
is_empty
()
);
}
self
.active_variable
=
self
...
...
@@ -392,7 +392,7 @@ impl ConstrainedLinearization for SerializableHistory {
.or_insert_with
(
Default
::
default
)
.remove
(
curr_txn
));
}
self
.active_write
.retain
(|
_
,
ts
|
ts
.
len
()
>
0
);
self
.active_write
.retain
(|
_
,
ts
|
!
ts
.
is_empty
()
);
for
&
x
in
curr_txn_info
.1
.iter
()
{
let
read_by
=
self
.history
...
...
src/consistency/mod.rs
View file @
da5b7323
pub
mod
sat
;
pub
mod
algo
;
pub
mod
sat
;
pub
mod
util
;
#[derive(Debug)]
...
...
src/consistency/util.rs
View file @
da5b7323
...
...
@@ -48,10 +48,8 @@ where
fn
dfs_util_reach
(
&
self
,
s
:
&
T
,
u
:
&
T
,
reachable
:
&
mut
HashSet
<
T
>
)
->
bool
{
if
let
Some
(
vs
)
=
self
.adj_map
.get
(
u
)
{
for
&
v
in
vs
.iter
()
{
if
reachable
.insert
(
v
)
{
if
self
.dfs_util_reach
(
s
,
&
v
,
reachable
)
{
return
true
;
}
if
reachable
.insert
(
v
)
&&
self
.dfs_util_reach
(
s
,
&
v
,
reachable
)
{
return
true
;
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment