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
36022a68
Commit
36022a68
authored
Jan 02, 2015
by
Andrey Davydov
Committed by
Andrey Davydov
Jan 02, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
proc() replaced to unboxed closure
parent
3235e86b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
rocksdb.rs
src/rocksdb.rs
+4
-2
No files found.
src/rocksdb.rs
View file @
36022a68
...
...
@@ -23,6 +23,7 @@ use std::string::raw::from_buf_len;
use
std
::
ptr
;
use
std
::
mem
;
use
std
::
slice
;
use
std
::
ptr
::
Unique
;
use
rocksdb_ffi
;
...
...
@@ -463,10 +464,11 @@ pub struct RocksDBVector {
impl
RocksDBVector
{
pub
fn
from_c
(
val
:
*
mut
u8
,
val_len
:
size_t
)
->
RocksDBVector
{
unsafe
{
let
val
=
Unique
(
val
);
RocksDBVector
{
inner
:
CVec
::
new_with_dtor
(
val
,
val_len
as
uint
,
proc
(){
libc
::
free
(
val
as
*
mut
c_void
);
}
)
CVec
::
new_with_dtor
(
val
.
0
,
val_len
as
uint
,
move
|:|
libc
::
free
(
val
.
0
as
*
mut
libc
::
c_void
)
)
}
}
}
...
...
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