Explorar o código

Remove uneeded error, fix skip bug

Billy Barrow %!s(int64=2) %!d(string=hai) anos
pai
achega
4e976ae826
Modificáronse 2 ficheiros con 2 adicións e 1 borrados
  1. 1 1
      src/lib/Enumerable.vala
  2. 1 0
      src/lib/Queries/Skip.vala

+ 1 - 1
src/lib/Enumerable.vala

@@ -146,7 +146,7 @@ namespace Invercargill {
             throw new SequenceError.NO_ELEMENTS("The sequence contains no elements");
         }
 
-        public virtual T first_or_default() throws SequenceError {
+        public virtual T? first_or_default() {
             var tracker = get_tracker();
             if(tracker.has_next()) {
                 return tracker.get_next();

+ 1 - 0
src/lib/Queries/Skip.vala

@@ -31,6 +31,7 @@ namespace Invercargill {
                     if(!tracker.has_next()) {
                         return false;
                     }
+                    tracker.get_next ();
                     c++;
                 }