Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
R
rust-rocksdb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangzongwu
rust-rocksdb
Commits
e3db62fb
Commit
e3db62fb
authored
Jan 19, 2015
by
Tyler Neely
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small cleanup
parent
2eb2710d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
rocksdb.rs
src/rocksdb.rs
+2
-4
No files found.
src/rocksdb.rs
View file @
e3db62fb
...
@@ -57,12 +57,11 @@ impl RocksDB {
...
@@ -57,12 +57,11 @@ impl RocksDB {
let
err
=
0
as
*
mut
i8
;
let
err
=
0
as
*
mut
i8
;
let
db
=
rocksdb_ffi
::
rocksdb_open
(
opts
.inner
,
cpath_ptr
,
err
);
let
db
=
rocksdb_ffi
::
rocksdb_open
(
opts
.inner
,
cpath_ptr
,
err
);
let
rocksdb_ffi
::
RocksDBInstance
(
db_ptr
)
=
db
;
if
!
err
.is_null
()
{
if
!
err
.is_null
()
{
let
cs
=
from_c_str
(
err
as
*
const
i8
);
let
cs
=
from_c_str
(
err
as
*
const
i8
);
return
Err
(
cs
);
return
Err
(
cs
);
}
}
if
db
_ptr
.is_null
()
{
if
db
.
0
.is_null
()
{
return
Err
(
"Could not initialize database."
);
return
Err
(
"Could not initialize database."
);
}
}
Ok
(
RocksDB
{
inner
:
db
})
Ok
(
RocksDB
{
inner
:
db
})
...
@@ -134,8 +133,7 @@ impl RocksDB {
...
@@ -134,8 +133,7 @@ impl RocksDB {
RocksDBResult
<
'a
,
RocksDBVector
,
&
str
>
{
RocksDBResult
<
'a
,
RocksDBVector
,
&
str
>
{
unsafe
{
unsafe
{
let
readopts
=
rocksdb_ffi
::
rocksdb_readoptions_create
();
let
readopts
=
rocksdb_ffi
::
rocksdb_readoptions_create
();
let
rocksdb_ffi
::
RocksDBReadOptions
(
read_opts_ptr
)
=
readopts
;
if
readopts
.
0
.is_null
()
{
if
read_opts_ptr
.is_null
()
{
return
RocksDBResult
::
Error
(
"Unable to create rocksdb read
\
return
RocksDBResult
::
Error
(
"Unable to create rocksdb read
\
options. This is a fairly trivial call, and its failure
\
options. This is a fairly trivial call, and its failure
\
may be indicative of a mis-compiled or mis-loaded rocksdb
\
may be indicative of a mis-compiled or mis-loaded rocksdb
\
...
...
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