Remove maplit dependency and stop using a macro for hashmaps (#982)

This commit is contained in:
Micah
2024-10-31 11:56:54 -07:00
committed by GitHub
parent d9ab0e7de8
commit 34106f470f
13 changed files with 111 additions and 108 deletions

View File

@@ -7,7 +7,6 @@
use std::{borrow::Cow, sync::Arc, time::Duration};
use hyper::{header, Body, Method, Request, Response, StatusCode};
use maplit::hashmap;
use rbx_dom_weak::types::{Ref, Variant};
use ritz::{html, Fragment, HtmlContent, HtmlSelfClosingTag};
@@ -296,11 +295,12 @@ impl<'a> ExpandableSection<'a> {
// support for conditional attributes like `checked`.
let mut input = HtmlSelfClosingTag {
name: Cow::Borrowed("input"),
attributes: hashmap! {
Cow::Borrowed("class") => Cow::Borrowed("expandable-input"),
Cow::Borrowed("id") => Cow::Owned(input_id.clone()),
Cow::Borrowed("type") => Cow::Borrowed("checkbox"),
},
attributes: [
(Cow::Borrowed("class"), Cow::Borrowed("expandable-input")),
(Cow::Borrowed("id"), Cow::Owned(input_id.clone())),
(Cow::Borrowed("type"), Cow::Borrowed("checkbox")),
]
.into(),
};
if self.expanded {