mirror of
				https://github.com/nitnelave/lldap.git
				synced 2023-04-12 14:25:13 +00:00 
			
		
		
		
	app: fix clippy warning
This commit is contained in:
		
							parent
							
								
									5b7e5fe0e2
								
							
						
					
					
						commit
						8b4c70e6c8
					
				@ -5,8 +5,7 @@ use web_sys::HtmlDocument;
 | 
			
		||||
 | 
			
		||||
fn get_document() -> Result<HtmlDocument> {
 | 
			
		||||
    web_sys::window()
 | 
			
		||||
        .map(|w| w.document())
 | 
			
		||||
        .flatten()
 | 
			
		||||
        .and_then(|w| w.document())
 | 
			
		||||
        .ok_or_else(|| anyhow!("Could not get window document"))
 | 
			
		||||
        .and_then(|d| {
 | 
			
		||||
            d.dyn_into::<web_sys::HtmlDocument>()
 | 
			
		||||
@ -16,8 +15,7 @@ fn get_document() -> Result<HtmlDocument> {
 | 
			
		||||
 | 
			
		||||
pub fn set_cookie(cookie_name: &str, value: &str, expiration: &DateTime<Utc>) -> Result<()> {
 | 
			
		||||
    let doc = web_sys::window()
 | 
			
		||||
        .map(|w| w.document())
 | 
			
		||||
        .flatten()
 | 
			
		||||
        .and_then(|w| w.document())
 | 
			
		||||
        .ok_or_else(|| anyhow!("Could not get window document"))
 | 
			
		||||
        .and_then(|d| {
 | 
			
		||||
            d.dyn_into::<web_sys::HtmlDocument>()
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user