mirror of
https://github.com/lldap/lldap.git
synced 2024-11-25 00:50:55 +00:00
app: fix clippy warning
This commit is contained in:
parent
6c9086cc78
commit
204232659d
1 changed files with 2 additions and 4 deletions
|
@ -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 a new issue