code: static <T> void subscribe(Subscriber<? super T> s, Iterator<? extends T> it) {
          if (it == null) {
              error(s, new NullPointerException("The iterator is null"));
              return;
          }
  
          boolean b;
  
          try {
              b = it.hasNext();
          } catch (Throwable e) {
              error(s, e);
              return;
          }
  
          if (!b) {
             complete(s);
              return;
          }
  
          s.onSubscribe(new IterableSubscription<T>(s, it));
  
      }
docs: Common method to take an Iterator as a source of values.
  
  @param s
  @param it