[geary/wip/713891-traversable: 9/12] Nix Traversable namespace, just use Iterable
- From: Charles Lindsay <clindsay src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/713891-traversable: 9/12] Nix Traversable namespace, just use Iterable
- Date: Thu, 12 Dec 2013 02:58:16 +0000 (UTC)
commit f01a5f31b683547a0dd5727e849648ff6bf171b6
Author: Charles Lindsay <chaz yorba org>
Date: Wed Dec 11 17:50:30 2013 -0800
Nix Traversable namespace, just use Iterable
src/CMakeLists.txt | 2 +-
.../{util-traversable.vala => util-iterable.vala} | 14 +++++---------
2 files changed, 6 insertions(+), 10 deletions(-)
---
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 7ee7572..1054ce2 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -277,6 +277,7 @@ engine/util/util-generic-capabilities.vala
engine/util/util-html.vala
engine/util/util-imap-utf7.vala
engine/util/util-inet.vala
+engine/util/util-iterable.vala
engine/util/util-numeric.vala
engine/util/util-object.vala
engine/util/util-reference-semantics.vala
@@ -286,7 +287,6 @@ engine/util/util-stream.vala
engine/util/util-string.vala
engine/util/util-synchronization.vala
engine/util/util-time.vala
-engine/util/util-traversable.vala
engine/util/util-trillian.vala
)
diff --git a/src/engine/util/util-traversable.vala b/src/engine/util/util-iterable.vala
similarity index 93%
rename from src/engine/util/util-traversable.vala
rename to src/engine/util/util-iterable.vala
index ff5fb34..2effe7a 100644
--- a/src/engine/util/util-traversable.vala
+++ b/src/engine/util/util-iterable.vala
@@ -5,23 +5,21 @@
*/
namespace Geary {
- public Geary.Traversable.Iterable<G> traverse<G>(Gee.Iterable<G> i) {
- return new Geary.Traversable.Iterable<G>(i.iterator());
+ public Geary.Iterable<G> traverse<G>(Gee.Iterable<G> i) {
+ return new Geary.Iterable<G>(i.iterator());
}
}
-namespace Geary.Traversable {
-
/**
* An Iterable that simply wraps an existing Iterator. You get one iteration,
* and only one iteration. Basically every method triggers one iteration and
* returns a new object.
*
* Note that this can't inherit from Gee.Iterable because its interface
- * requires that map/filter/etc. return Iterators, not Iterables. It should
- * still work in foreach.
+ * requires that map/filter/etc. return Iterators, not Iterables. It still
+ * works in foreach.
*/
-public class Iterable<G> : BaseObject {
+public class Geary.Iterable<G> : BaseObject {
private Gee.Iterator<G> i;
public Iterable(Gee.Iterator<G> iterator) {
@@ -130,5 +128,3 @@ public class Iterable<G> : BaseObject {
return c;
}
}
-
-}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]