Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Dojo
addrindexrs
Commits
f3711652
Commit
f3711652
authored
Oct 31, 2019
by
kenshin-samourai
Browse files
remove fake.rs
parent
a02b103b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
38 deletions
+0
-38
src/fake.rs
src/fake.rs
+0
-37
src/lib.rs
src/lib.rs
+0
-1
No files found.
src/fake.rs
deleted
100644 → 0
View file @
a02b103b
use
crate
::
store
::{
ReadStore
,
Row
,
WriteStore
};
use
crate
::
util
::
Bytes
;
pub
struct
FakeStore
;
impl
ReadStore
for
FakeStore
{
fn
get
(
&
self
,
_
key
:
&
[
u8
])
->
Option
<
Bytes
>
{
None
}
fn
scan
(
&
self
,
_
prefix
:
&
[
u8
])
->
Vec
<
Row
>
{
vec!
[]
}
}
impl
WriteStore
for
FakeStore
{
fn
write
<
I
:
IntoIterator
<
Item
=
Row
>>
(
&
self
,
_
rows
:
I
)
{}
fn
flush
(
&
self
)
{}
}
#[cfg(test)]
mod
tests
{
#[test]
fn
test_fakestore
()
{
use
crate
::
fake
;
use
crate
::
store
::{
ReadStore
,
Row
,
WriteStore
};
let
store
=
fake
::
FakeStore
{};
store
.write
(
vec!
[
Row
{
key
:
b
"k"
.to_vec
(),
value
:
b
"v"
.to_vec
(),
}]);
store
.flush
();
// nothing was actually written
assert
!
(
store
.get
(
b
""
)
.is_none
());
assert
!
(
store
.scan
(
b
""
)
.is_empty
());
}
}
src/lib.rs
View file @
f3711652
...
...
@@ -17,7 +17,6 @@ pub mod cache;
pub
mod
config
;
pub
mod
daemon
;
pub
mod
errors
;
pub
mod
fake
;
pub
mod
index
;
pub
mod
mempool
;
pub
mod
metrics
;
...
...
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