mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
use shared reference for tab item id
This commit is contained in:
parent
e66b065fc3
commit
ea3aab4d68
3 changed files with 7 additions and 6 deletions
|
|
@ -25,7 +25,7 @@ use std::{cell::RefCell, collections::HashMap, rc::Rc};
|
|||
pub struct Tab {
|
||||
profile: Rc<Profile>,
|
||||
actions: (Rc<BrowserAction>, Rc<WindowAction>),
|
||||
index: Rc<RefCell<HashMap<GString, Rc<Item>>>>,
|
||||
index: Rc<RefCell<HashMap<Rc<GString>, Rc<Item>>>>,
|
||||
pub widget: Rc<Widget>,
|
||||
}
|
||||
|
||||
|
|
@ -33,7 +33,8 @@ impl Tab {
|
|||
// Construct
|
||||
pub fn new(profile: Rc<Profile>, action: (Rc<BrowserAction>, Rc<WindowAction>)) -> Self {
|
||||
// Init empty HashMap index
|
||||
let index: Rc<RefCell<HashMap<GString, Rc<Item>>>> = Rc::new(RefCell::new(HashMap::new()));
|
||||
let index: Rc<RefCell<HashMap<Rc<GString>, Rc<Item>>>> =
|
||||
Rc::new(RefCell::new(HashMap::new()));
|
||||
|
||||
// Init context menu
|
||||
let menu = Menu::new(action.1.clone());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue