Add str borrowing and fix hash calculation bug#7
Conversation
|
Good catch! Thanks a lot! May I ask if you are working with Yew? |
|
Looks like clippy might have spotted an interesting issue for once. It's possible that I don't know if it's okay for you but if possible I would really like to learn more about your use case for using IMap in a Yew web app (assuming that is what you are doing). Is it an OSS project I can read? Or could you drop a few lines or some code that explains how you use it? |
|
@cecton I fixed it. ) I use Yew in my helper library yew-mdc-widgets of the Rust-and-Yew friendly builders for the Google MDC web components. For example: let open_menu_button = Button::new()
.label("Open Menu")
.on_click(|_| Menu::open_existing("simple-menu"));
let menu = Menu::new().id("simple-menu").items(vec![
ListItem::new().text("Menu Item 1"),
ListItem::new().text("Menu Item 2"),
ListItem::new().text("Menu Item 3"),
]);
html! {
<div class = { Menu::ANCHOR_CLASS }>
{ open_menu_button }
{ menu }
</div>
}Live demo. Additionaly, I will be using Yew and yew-mdc-widgets to develop applications for the Local-first web application platform Laplace. |
|
It looks super interesting! Thanks! That might give me some inspiration for https://yewprint.rm.rs/ |
|
Released in v0.3.2 |
@cecton Hashes of the
IString::Static("foo")andIString::Rc(Rc::from("foo"))do not match. This is confusing when using anHashMap.