Fix feature flags.

This commit is contained in:
Stephen Chung
2020-08-05 22:53:01 +08:00
parent 5ea08d2b50
commit ae11dbbefe
14 changed files with 60 additions and 46 deletions

View File

@@ -410,7 +410,7 @@ impl fmt::Display for Dynamic {
}
#[cfg(not(feature = "no_closure"))]
#[cfg(feature = "sync")]
Union::Shared(cell) => fmt::Display::fmt(*cell.read_lock().unwrap(), f),
Union::Shared(cell) => fmt::Display::fmt(&*cell.read().unwrap(), f),
}
}
}
@@ -448,7 +448,7 @@ impl fmt::Debug for Dynamic {
}
#[cfg(not(feature = "no_closure"))]
#[cfg(feature = "sync")]
Union::Shared(cell) => fmt::Display::fmt(*cell.read_lock().unwrap(), f),
Union::Shared(cell) => fmt::Debug::fmt(&*cell.read().unwrap(), f),
}
}
}