fn finish_encoding(&mut self, s: &mut String) {
        s.push('\n');
        let mut link_lines = Vec::new();
        self.shortcut_link.take();
        let links = std::mem::take(&mut self.links);
        for (shortcut, links) in links {
            for (index, link) in links.into_iter().enumerate() {
                let mut line = String::new();
                line.push('[');
                line.push_str(&shortcut);
                if index != 0 {
                    line.push_str(&format!("-{}", index));
                }
                line.push_str("]: ");
                line.push_str(&link);
                link_lines.push(line);
            }
        }
        link_lines.sort_unstable();
        for line in link_lines {
            s.push('\n');
            s.push_str(&line)
        }
    }
/// Called after encoding a file.
Called after encoding a file.
Called after encoding a file .
fn finish_encoding(&mut self, s: &mut String) {
        s.push('\n');
        let mut link_lines = Vec::new();
        self.shortcut_link.take();
        let links = std::mem::take(&mut self.links);
        for (shortcut, links) in links {
            for (index, link) in links.into_iter().enumerate() {
                let mut line = String::new();
                line.push('[');
                line.push_str(&shortcut);
                if index != 0 {
                    line.push_str(&format!("-{}", index));
                }
                line.push_str("]: ");
                line.push_str(&link);
                link_lines.push(line);
            }
        }
        link_lines.sort_unstable();
        for line in link_lines {
            s.push('\n');
            s.push_str(&line)
        }
    }
fn finish_encoding ( & mut self , s : & mut String ) { s . push ( '\n' ) ; let mut link_lines = Vec :: new ( ) ; self . shortcut_link . take ( ) ; let links = std :: mem :: take ( & mut self . links ) ; for ( shortcut , links ) in links { for ( index , link ) in links . into_iter ( ) . enumerate ( ) { let mut line = String :: new ( ) ; line . push ( '[' ) ; line . push_str ( & shortcut ) ; if index != 0 { line . push_str ( & format ! ( " " index ) ) ; } line . push_str ( " " ) ; line . push_str ( & link ) ; link_lines . push ( line ) ; } } link_lines . sort_unstable ( ) ; for line in link_lines { s . push ( '\n' ) ; s . push_str ( & line ) } }
Called after encoding a file.
Called after encoding a file .
&mut self
s
&mut String
&mut self
s
&mut String