runtime: mark EnterGuard with must_use (#3609)

This commit is contained in:
Faraz
2021-03-12 09:06:08 +01:00
committed by GitHub
parent edfff7551a
commit a1b4bdee61
+1
View File
@@ -39,6 +39,7 @@ pub struct Handle {
/// ///
/// [`Runtime::enter`]: fn@crate::runtime::Runtime::enter /// [`Runtime::enter`]: fn@crate::runtime::Runtime::enter
#[derive(Debug)] #[derive(Debug)]
#[must_use = "Creating and dropping a guard does nothing"]
pub struct EnterGuard<'a> { pub struct EnterGuard<'a> {
handle: &'a Handle, handle: &'a Handle,
guard: context::EnterGuard, guard: context::EnterGuard,