use crate::teleport::types::{Gate, Portal};
use pipelight_error::PipelightError;
use std::env;
use miette::{Context, Result};
impl Portal {
pub fn new() -> Result<Self, PipelightError> {
Ok(Portal {
target: Gate::default(),
origin: Gate::default().directory(env::current_dir().unwrap().display().to_string())?,
current: Gate::default()
.directory(env::current_dir().unwrap().display().to_string())?,
seed: None,
})
}
}