From 45323f28012206b140b8062a437a1428597cf0bc Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sun, 6 Sep 2015 09:57:52 +0200 Subject: [PATCH] Remove wibox.hierarchy:get_parent() It's unused. Signed-off-by: Uli Schlachter --- lib/wibox/hierarchy.lua | 5 ----- spec/wibox/hierarchy_spec.lua | 10 ---------- 2 files changed, 15 deletions(-) diff --git a/lib/wibox/hierarchy.lua b/lib/wibox/hierarchy.lua index f41ff6e51..db46c10e4 100644 --- a/lib/wibox/hierarchy.lua +++ b/lib/wibox/hierarchy.lua @@ -96,11 +96,6 @@ function hierarchy.new(context, widget, width, height, redraw_callback, layout_c return hierarchy_new(context, widget, width, height, redraw_callback, layout_callback, callback_arg, nil) end ---- Get the parent hierarchy of this widget hierarchy (or nil). -function hierarchy:get_parent() - return self._parent -end - --- Get the widget that this hierarchy manages. function hierarchy:get_widget() return self._widget diff --git a/spec/wibox/hierarchy_spec.lua b/spec/wibox/hierarchy_spec.lua index 31399bef1..6472eda33 100644 --- a/spec/wibox/hierarchy_spec.lua +++ b/spec/wibox/hierarchy_spec.lua @@ -34,10 +34,6 @@ describe("wibox.hierarchy", function() instance = hierarchy.new(context, widget, 10, 20, nop, nop) end) - it("get_parent", function() - assert.is_nil(instance:get_parent()) - end) - it("get_widget", function() assert.is.equal(instance:get_widget(), widget) end) @@ -155,12 +151,6 @@ describe("wibox.hierarchy", function() hierarchy_child = children[1] end) - it("get_parent", function() - assert.is.equal(hierarchy_child:get_parent(), hierarchy_intermediate) - assert.is.equal(hierarchy_intermediate:get_parent(), hierarchy_parent) - assert.is_nil(hierarchy_parent:get_parent()) - end) - it("get_widget", function() assert.is.equal(hierarchy_child:get_widget(), child) assert.is.equal(hierarchy_intermediate:get_widget(), intermediate)