docs: @SuppressWarnings("unchecked")
      public static <T> Set<T> newHashSet(Iterable<? extends T> elements) {
          LettuceAssert.notNull(elements, "Iterable must not be null");
  
          if (elements instanceof Collection<?>) {
              return newHashSet((Collection<T>) elements);
          }
  
          Set<T> set = new HashSet<>();
          for (T e : elements) {
              set.add(e);
          }
          return set;
      }