This commit is contained in:
@@ -47,8 +47,9 @@ impl ReflMod {
|
||||
async fn try_populate(&self) -> Result<(), api::LsModuleError> {
|
||||
let path_tok = iv(&self.0.path[..]).await;
|
||||
let reply = match request(api::LsModule(sys_id(), path_tok.to_api())).await {
|
||||
Err(api::LsModuleError::TreeUnavailable) =>
|
||||
panic!("Reflected tree accessed outside an interpreter call. This extension is faulty."),
|
||||
Err(api::LsModuleError::TreeUnavailable) => {
|
||||
panic!("Reflected tree accessed outside an interpreter call. This extension is faulty.")
|
||||
},
|
||||
Err(err) => return Err(err),
|
||||
Ok(details) => details,
|
||||
};
|
||||
@@ -79,10 +80,12 @@ impl ReflMod {
|
||||
return None;
|
||||
}
|
||||
match self.try_populate().await {
|
||||
Err(api::LsModuleError::InvalidPath) =>
|
||||
panic!("Path became invalid since module was created"),
|
||||
Err(api::LsModuleError::IsConstant) =>
|
||||
panic!("Path previously contained a module but now contains a constant"),
|
||||
Err(api::LsModuleError::InvalidPath) => {
|
||||
panic!("Path became invalid since module was created")
|
||||
},
|
||||
Err(api::LsModuleError::IsConstant) => {
|
||||
panic!("Path previously contained a module but now contains a constant")
|
||||
},
|
||||
Err(api::LsModuleError::TreeUnavailable) => unreachable!(),
|
||||
Ok(()) => (),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user