move getters below constructors

This commit is contained in:
Josh Thomas 2024-12-05 16:18:54 -06:00
parent 3f0b3bb56b
commit 7e899a0778

View file

@ -19,18 +19,6 @@ impl PythonEnvironment {
}
}
pub fn root(&self) -> &PathBuf {
&self.root
}
pub fn build(&self) -> &Interpreter {
&self.build
}
pub fn runtime(&self) -> &Interpreter {
&self.runtime
}
pub fn initialize() -> Result<Self, EnvironmentError> {
Python::with_gil(|py| {
let initial_build = Interpreter::for_build(py)?;
@ -47,6 +35,18 @@ impl PythonEnvironment {
Ok(Self::new(root, final_build, runtime))
})
}
pub fn root(&self) -> &PathBuf {
&self.root
}
pub fn build(&self) -> &Interpreter {
&self.build
}
pub fn runtime(&self) -> &Interpreter {
&self.runtime
}
}
impl fmt::Display for PythonEnvironment {