소스 검색

Remove uneeded error, fix skip bug

Billy Barrow 2 년 전
부모
커밋
4e976ae826
2개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  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++;
                 }