pub fn add_rlib(&mut self, rlib: &Path, name: &str, lto: bool)
                    -> io::Result<()> {
        // Ignoring obj file starting with the crate name
        // as simple comparison is not enough - there
        // might be also an extra name suffix
        let obj_start = format!("{}", name);

        // Ignoring all bytecode files, no matter of
        // name
        let bc_ext = ".bytecode.deflate";

        self.add_archive(rlib, &name[..], move |fname: &str| {
            let skip_obj = lto && fname.starts_with(&obj_start)
                && fname.ends_with(".o");
            skip_obj || fname.ends_with(bc_ext) || fname == METADATA_FILENAME
        })
    }
/// Adds all of the contents of the rlib at the specified path to this
/// archive.
///
/// This ignores adding the bytecode from the rlib, and if LTO is enabled
/// then the object file also isn't added.
Adds all of the contents of the rlib at the specified path to this
archive.

This ignores adding the bytecode from the rlib, and if LTO is enabled
then the object file also isn't added.
Adds all of the contents of the rlib at the specified path to this archive . This ignores adding the bytecode from the rlib and if LTO is enabled then the object file also isn ' t added .
pub fn add_rlib(&mut self, rlib: &Path, name: &str, lto: bool)
                    -> io::Result<()> {
        // Ignoring obj file starting with the crate name
        // as simple comparison is not enough - there
        // might be also an extra name suffix
        let obj_start = format!("{}", name);
        // Ignoring all bytecode files, no matter of
        // name
        let bc_ext = ".bytecode.deflate";
        self.add_archive(rlib, &name[..], move |fname: &str| {
            let skip_obj = lto && fname.starts_with(&obj_start)
                && fname.ends_with(".o");
            skip_obj || fname.ends_with(bc_ext) || fname == METADATA_FILENAME
        })
    }
pub fn add_rlib ( & mut self , rlib : & Path , name : & str , lto : bool ) -> io :: Result < ( ) > { // Ignoring obj file starting with the crate name // as simple comparison is not enough - there // might be also an extra name suffix let obj_start = format ! ( " " name ) ; // Ignoring all bytecode files, no matter of // name let bc_ext = " " ; self . add_archive ( rlib , & name [ .. ] , move | fname : & str | { let skip_obj = lto && fname . starts_with ( & obj_start ) && fname . ends_with ( " " ) ; skip_obj || fname . ends_with ( bc_ext ) || fname == METADATA_FILENAME } ) }
Adds all of the contents of the rlib at the specified path to this
archive.
Adds all of the contents of the rlib at the specified path to this archive .
&mut self
rlib
&Path
name
&str
lto
bool
&mut self
rlib
&Path
name
&str
lto
bool