mirror of
				https://github.com/dani-garcia/vaultwarden.git
				synced 2025-10-31 02:08:20 +02:00 
			
		
		
		
	Update Rust and crates (#5248)
* Update Rust and crates - Updated Rust to v1.83.0 - Updated MSRV to v1.82.0 (Needed for html5gum crate) - Updated icon fetching code to match new html5gum version - Updated workflows - Enabled edition 2024 clippy lints Nightly reports some clippy hints, but that would be too much to change in this PR i think. Signed-off-by: BlackDex <black.dex@gmail.com> * Some additional updates - Patch fern to allow syslog-7 feature - Fixed diesel logger which was broken because of the sqlite backup feature Refactored the sqlite backup because of this - Added a build workflow test to include the query_logger feature Signed-off-by: BlackDex <black.dex@gmail.com> * Also patch yubico-rs and latest updates Signed-off-by: BlackDex <black.dex@gmail.com> --------- Signed-off-by: BlackDex <black.dex@gmail.com>
This commit is contained in:
		
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							da3701c0cf
						
					
				
				
					commit
					71b3d3c818
				
			| @@ -19,7 +19,7 @@ use tokio::{ | ||||
|     io::{AsyncReadExt, AsyncWriteExt}, | ||||
| }; | ||||
|  | ||||
| use html5gum::{Emitter, HtmlString, InfallibleTokenizer, Readable, StringReader, Tokenizer}; | ||||
| use html5gum::{Emitter, HtmlString, Readable, StringReader, Tokenizer}; | ||||
|  | ||||
| use crate::{ | ||||
|     error::Error, | ||||
| @@ -261,11 +261,7 @@ impl Icon { | ||||
|     } | ||||
| } | ||||
|  | ||||
| fn get_favicons_node( | ||||
|     dom: InfallibleTokenizer<StringReader<'_>, FaviconEmitter>, | ||||
|     icons: &mut Vec<Icon>, | ||||
|     url: &url::Url, | ||||
| ) { | ||||
| fn get_favicons_node(dom: Tokenizer<StringReader<'_>, FaviconEmitter>, icons: &mut Vec<Icon>, url: &url::Url) { | ||||
|     const TAG_LINK: &[u8] = b"link"; | ||||
|     const TAG_BASE: &[u8] = b"base"; | ||||
|     const TAG_HEAD: &[u8] = b"head"; | ||||
| @@ -274,7 +270,7 @@ fn get_favicons_node( | ||||
|  | ||||
|     let mut base_url = url.clone(); | ||||
|     let mut icon_tags: Vec<Tag> = Vec::new(); | ||||
|     for token in dom { | ||||
|     for Ok(token) in dom { | ||||
|         let tag_name: &[u8] = &token.tag.name; | ||||
|         match tag_name { | ||||
|             TAG_LINK => { | ||||
| @@ -401,7 +397,7 @@ async fn get_icon_url(domain: &str) -> Result<IconUrlResult, Error> { | ||||
|         // 384KB should be more than enough for the HTML, though as we only really need the HTML header. | ||||
|         let limited_reader = stream_to_bytes_limit(content, 384 * 1024).await?.to_vec(); | ||||
|  | ||||
|         let dom = Tokenizer::new_with_emitter(limited_reader.to_reader(), FaviconEmitter::default()).infallible(); | ||||
|         let dom = Tokenizer::new_with_emitter(limited_reader.to_reader(), FaviconEmitter::default()); | ||||
|         get_favicons_node(dom, &mut iconlist, &url); | ||||
|     } else { | ||||
|         // Add the default favicon.ico to the list with just the given domain | ||||
|   | ||||
		Reference in New Issue
	
	Block a user