mirror of
https://github.com/joshuadavidthomas/django-language-server.git
synced 2025-09-10 20:36:21 +00:00
move getters below constructors
This commit is contained in:
parent
3f0b3bb56b
commit
7e899a0778
1 changed files with 12 additions and 12 deletions
|
@ -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> {
|
pub fn initialize() -> Result<Self, EnvironmentError> {
|
||||||
Python::with_gil(|py| {
|
Python::with_gil(|py| {
|
||||||
let initial_build = Interpreter::for_build(py)?;
|
let initial_build = Interpreter::for_build(py)?;
|
||||||
|
@ -47,6 +35,18 @@ impl PythonEnvironment {
|
||||||
Ok(Self::new(root, final_build, runtime))
|
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 {
|
impl fmt::Display for PythonEnvironment {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue