[red-knot] Improved file watching (#12382)

This commit is contained in:
Micha Reiser 2024-07-23 08:18:59 +02:00 committed by GitHub
parent a9f8bd59b2
commit 40d9324f5a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 1476 additions and 381 deletions

View file

@ -33,10 +33,7 @@ pub struct Jar(
);
/// Database giving access to semantic information about a Python program.
pub trait Db:
SourceDb + ResolverDb + DbWithJar<Jar> + Upcast<dyn SourceDb> + Upcast<dyn ResolverDb>
{
}
pub trait Db: SourceDb + ResolverDb + DbWithJar<Jar> + Upcast<dyn ResolverDb> {}
#[cfg(test)]
pub(crate) mod tests {
@ -120,12 +117,18 @@ pub(crate) mod tests {
fn upcast(&self) -> &(dyn SourceDb + 'static) {
self
}
fn upcast_mut(&mut self) -> &mut (dyn SourceDb + 'static) {
self
}
}
impl Upcast<dyn ResolverDb> for TestDb {
fn upcast(&self) -> &(dyn ResolverDb + 'static) {
self
}
fn upcast_mut(&mut self) -> &mut (dyn ResolverDb + 'static) {
self
}
}
impl red_knot_module_resolver::Db for TestDb {}