Get diagnostics view almost building in the zed2 world
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
96f0257fb3
commit
f4eb219c75
22 changed files with 2251 additions and 91 deletions
|
@ -2476,6 +2476,18 @@ pub enum ElementId {
|
|||
FocusHandle(FocusId),
|
||||
}
|
||||
|
||||
impl TryInto<SharedString> for ElementId {
|
||||
type Error = anyhow::Error;
|
||||
|
||||
fn try_into(self) -> anyhow::Result<SharedString> {
|
||||
if let ElementId::Name(name) = self {
|
||||
Ok(name)
|
||||
} else {
|
||||
Err(anyhow!("element id is not string"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<EntityId> for ElementId {
|
||||
fn from(id: EntityId) -> Self {
|
||||
ElementId::View(id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue