Merge pull request #6361 from faldor20/fix-lang-server-hang

Fix hang from bad imports
This commit is contained in:
Richard Feldman 2024-01-21 22:06:48 -05:00 committed by GitHub
commit 07ddd272e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 127 additions and 8 deletions

View file

@ -23,6 +23,16 @@ impl<'a> HeaderType<'a> {
HeaderType::Platform { .. } | HeaderType::Package { .. } => &[],
}
}
pub fn to_string(&'a self) -> &str {
match self {
HeaderType::App { .. } => "app",
HeaderType::Hosted { .. } => "hosted",
HeaderType::Builtin { .. } => "builtin",
HeaderType::Package { .. } => "package",
HeaderType::Platform { .. } => "platform",
HeaderType::Interface { .. } => "interface",
}
}
}
#[derive(Debug)]