1
Fork 0

Register new snapshots

This commit is contained in:
Tamir Duberstein 2015-04-27 14:10:49 -07:00
parent 8871c17b76
commit 69abc12b00
89 changed files with 29 additions and 397 deletions

View file

@ -70,8 +70,7 @@ fn append_to_string<F>(buf: &mut String, f: F) -> Result<usize>
where F: FnOnce(&mut Vec<u8>) -> Result<usize>
{
struct Guard<'a> { s: &'a mut Vec<u8>, len: usize }
#[unsafe_destructor]
impl<'a> Drop for Guard<'a> {
impl<'a> Drop for Guard<'a> {
fn drop(&mut self) {
unsafe { self.s.set_len(self.len); }
}