Rename cx.global_default_mut to cx.global_default
This commit is contained in:
@@ -764,7 +764,7 @@ pub struct GroupBounds(HashMap<SharedString, SmallVec<[Bounds<Pixels>; 1]>>);
|
||||
|
||||
impl GroupBounds {
|
||||
pub fn get(name: &SharedString, cx: &mut AppContext) -> Option<Bounds<Pixels>> {
|
||||
cx.default_global_mut::<Self>()
|
||||
cx.default_global::<Self>()
|
||||
.0
|
||||
.get(name)
|
||||
.and_then(|bounds_stack| bounds_stack.last())
|
||||
@@ -772,7 +772,7 @@ impl GroupBounds {
|
||||
}
|
||||
|
||||
pub fn push(name: SharedString, bounds: Bounds<Pixels>, cx: &mut AppContext) {
|
||||
cx.default_global_mut::<Self>()
|
||||
cx.default_global::<Self>()
|
||||
.0
|
||||
.entry(name)
|
||||
.or_default()
|
||||
@@ -780,7 +780,7 @@ impl GroupBounds {
|
||||
}
|
||||
|
||||
pub fn pop(name: &SharedString, cx: &mut AppContext) {
|
||||
cx.default_global_mut::<Self>()
|
||||
cx.default_global::<Self>()
|
||||
.0
|
||||
.get_mut(name)
|
||||
.unwrap()
|
||||
|
||||
Reference in New Issue
Block a user