forked from proxmox-mirrors/proxmox
		
	clippy fix: complex type definitions
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
This commit is contained in:
		
							parent
							
								
									3c7c9fc55d
								
							
						
					
					
						commit
						a36769b11a
					
				| @ -113,21 +113,19 @@ pub fn standard_repositories( | ||||
|     result | ||||
| } | ||||
| 
 | ||||
| /// Type containing successfully parsed files, a list of errors for files that
 | ||||
| /// could not be read and a common digest for the successfully parsed files.
 | ||||
| pub type Repositories = ( | ||||
|     Vec<APTRepositoryFile>, | ||||
|     Vec<APTRepositoryFileError>, | ||||
|     [u8; 32], | ||||
| ); | ||||
| 
 | ||||
| /// Returns all APT repositories configured in `/etc/apt/sources.list` and
 | ||||
| /// in `/etc/apt/sources.list.d` including disabled repositories.
 | ||||
| ///
 | ||||
| /// Returns the succesfully parsed files, a list of errors for files that could
 | ||||
| /// not be read or parsed and a common digest for the succesfully parsed files.
 | ||||
| ///
 | ||||
| /// The digest is guaranteed to be set for each successfully parsed file.
 | ||||
| pub fn repositories() -> Result< | ||||
|     ( | ||||
|         Vec<APTRepositoryFile>, | ||||
|         Vec<APTRepositoryFileError>, | ||||
|         [u8; 32], | ||||
|     ), | ||||
|     Error, | ||||
| > { | ||||
| pub fn repositories() -> Result<Repositories, Error> { | ||||
|     let to_result = |files: Vec<APTRepositoryFile>, errors: Vec<APTRepositoryFileError>| { | ||||
|         let common_digest = common_digest(&files); | ||||
| 
 | ||||
|  | ||||
| @ -40,10 +40,10 @@ impl<'a> Iterator for PropertyIterator<'a> { | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| type NextProperty<'a> = (Option<&'a str>, Cow<'a, str>, &'a str); | ||||
| 
 | ||||
| /// Returns an optional key, its value, and the remainder of `data`.
 | ||||
| pub(crate) fn next_property( | ||||
|     mut data: &str, | ||||
| ) -> Option<Result<(Option<&str>, Cow<str>, &str), Error>> { | ||||
| pub(crate) fn next_property(mut data: &str) -> Option<Result<NextProperty, Error>> { | ||||
|     if data.is_empty() { | ||||
|         return None; | ||||
|     } | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Lukas Wagner
						Lukas Wagner