Mark Task as #[must_use] (#6068)
				
					
				
			The `async_executor::Task` that it wraps is also `#[must_use]` with the same message. Co-authored-by: devil-ira <justthecooldude@gmail.com>
This commit is contained in:
		
							parent
							
								
									a09dd034a2
								
							
						
					
					
						commit
						527dce9a69
					
				@ -14,6 +14,7 @@ use std::{
 | 
			
		||||
/// Tasks that panic get immediately canceled. Awaiting a canceled task also causes a panic.
 | 
			
		||||
/// Wraps `async_executor::Task`
 | 
			
		||||
#[derive(Debug)]
 | 
			
		||||
#[must_use = "Tasks are canceled when dropped, use `.detach()` to run them in the background."]
 | 
			
		||||
pub struct Task<T>(async_executor::Task<T>);
 | 
			
		||||
 | 
			
		||||
impl<T> Task<T> {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user