std::str: replace .as_imm_buf with .as_ptr.
This commit is contained in:
parent
9177f7ecb4
commit
17ac2aa523
6 changed files with 73 additions and 107 deletions
|
|
@ -106,9 +106,8 @@ fn render(w: &mut io::Writer, s: &str) {
|
|||
let markdown = sd_markdown_new(extensions, 16, &callbacks,
|
||||
&options as *html_renderopt as *libc::c_void);
|
||||
|
||||
s.as_imm_buf(|data, len| {
|
||||
sd_markdown_render(ob, data, len as libc::size_t, markdown);
|
||||
});
|
||||
|
||||
sd_markdown_render(ob, s.as_ptr(), s.len() as libc::size_t, markdown);
|
||||
sd_markdown_free(markdown);
|
||||
|
||||
vec::raw::buf_as_slice((*ob).data, (*ob).size as uint, |buf| {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue