std: Rename strbuf operations to string
[breaking-change]
This commit is contained in:
parent
4348e23b26
commit
1f1b2e42d7
304 changed files with 2567 additions and 2567 deletions
|
@ -29,15 +29,15 @@ pub fn highlight(src: &str, class: Option<&str>) -> String {
|
|||
debug!("highlighting: ================\n{}\n==============", src);
|
||||
let sess = parse::new_parse_sess();
|
||||
let fm = parse::string_to_filemap(&sess,
|
||||
src.to_strbuf(),
|
||||
"<stdin>".to_strbuf());
|
||||
src.to_string(),
|
||||
"<stdin>".to_string());
|
||||
|
||||
let mut out = io::MemWriter::new();
|
||||
doit(&sess,
|
||||
lexer::new_string_reader(&sess.span_diagnostic, fm),
|
||||
class,
|
||||
&mut out).unwrap();
|
||||
str::from_utf8_lossy(out.unwrap().as_slice()).to_strbuf()
|
||||
str::from_utf8_lossy(out.unwrap().as_slice()).to_string()
|
||||
}
|
||||
|
||||
/// Exhausts the `lexer` writing the output into `out`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue