Don't need to hard-code static lifetime.
This commit is contained in:
		
							parent
							
								
									ae3add9c81
								
							
						
					
					
						commit
						8868cfb63f
					
				| @ -7,10 +7,10 @@ use tokio::fs::DirEntry; | ||||
| 
 | ||||
| use crate::error::CustomError; | ||||
| 
 | ||||
| pub(crate) fn walk_fs<P: AsRef<Path> + std::marker::Send + 'static>( | ||||
| pub(crate) fn walk_fs<'p, P: AsRef<Path> + std::marker::Send + 'p>( | ||||
|     root: P, | ||||
|     predicate: fn(&DirEntry) -> Result<bool, CustomError>, | ||||
| ) -> BoxFuture<'static, Result<Vec<DirEntry>, CustomError>> { | ||||
| ) -> BoxFuture<'p, Result<Vec<DirEntry>, CustomError>> { | ||||
|     async move { | ||||
|         let mut ret = Vec::new(); | ||||
|         let mut entries = tokio::fs::read_dir(root).await?; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Tom Alexander
						Tom Alexander