libserialize: use unboxed closures

This commit is contained in:
Jorge Aparicio
2014-12-07 11:59:59 -05:00
parent 95d0763707
commit 9b075bcf3f
+1 -1
View File
@@ -2680,7 +2680,7 @@ fn test_write_object() {
from_str(a.to_pretty_str().as_slice()).unwrap());
}
fn with_str_writer(f: |&mut io::Writer|) -> string::String {
fn with_str_writer<F>(f: F) -> string::String where F: FnOnce(&mut io::Writer){
use std::str;
let mut m = Vec::new();