pub fn from_tree_env(f: &mut impl FuchsiaPaths) -> Result<Self> {
        let ssh_file = File::open(f.find_fuchsia_root()?.join(".fx-ssh-path"))?;
        let ssh_file = BufReader::new(ssh_file);
        let mut lines = ssh_file.lines();

        let private_key = PathBuf::from(lines.next().unwrap()?);
        let authorized_keys = PathBuf::from(lines.next().unwrap()?);
        Ok(Self { authorized_keys: authorized_keys, private_key: private_key })
    }
/// Initialize SSH key files for in-tree usage.
///
/// Requires the environment variable FUCHSIA_BUILD_DIR to be specified.
Initialize SSH key files for in-tree usage.
Requires the environment variable FUCHSIA_BUILD_DIR to be specified.
Initialize SSH key files for in - tree usage . Requires the environment variable FUCHSIA_BUILD_DIR to be specified .
pub fn from_tree_env(f: &mut impl FuchsiaPaths) -> Result<Self> {
        let ssh_file = File::open(f.find_fuchsia_root()?.join(".fx-ssh-path"))?;
        let ssh_file = BufReader::new(ssh_file);
        let mut lines = ssh_file.lines();
        let private_key = PathBuf::from(lines.next().unwrap()?);
        let authorized_keys = PathBuf::from(lines.next().unwrap()?);
        Ok(Self { authorized_keys: authorized_keys, private_key: private_key })
    }
pub fn from_tree_env ( f : & mut impl FuchsiaPaths ) -> Result < Self > { let ssh_file = File :: open ( f . find_fuchsia_root ( ) ? . join ( " " ) ) ? ; let ssh_file = BufReader :: new ( ssh_file ) ; let mut lines = ssh_file . lines ( ) ; let private_key = PathBuf :: from ( lines . next ( ) . unwrap ( ) ? ) ; let authorized_keys = PathBuf :: from ( lines . next ( ) . unwrap ( ) ? ) ; Ok ( Self { authorized_keys : authorized_keys , private_key : private_key } ) }
Initialize SSH key files for in-tree usage.
Initialize SSH key files for in - tree usage .
f
&mut impl FuchsiaPaths
f
&mut impl FuchsiaPaths