Skip to content

Conversation

@jpenilla
Copy link
Member

@jpenilla jpenilla commented Feb 20, 2024

Removes the need for casting:

  @Override
  public Iterable<Suggestion> suggestions(final CommandContext<Commander> commandContext, final CommandInput input) {
    return mods().allMods()
      .map(modDescription -> (Suggestion) tooltipSuggestion(
        modDescription.modId(),
        Component.literal(modDescription.name())
      ))
      .toList();
  }

->

  @Override
  public Iterable<? extends Suggestion> suggestions(final CommandContext<Commander> commandContext, final CommandInput input) {
    return mods().allMods()
      .map(modDescription -> tooltipSuggestion(
        modDescription.modId(),
        Component.literal(modDescription.name())
      ))
      .toList();
  }

@github-actions
Copy link

Test Results

 84 files  ±0   84 suites  ±0   13s ⏱️ -2s
415 tests ±0  415 ✅ ±0  0 💤 ±0  0 ❌ ±0 
459 runs  ±0  459 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 819b6d0. ± Comparison against base commit 09b3edd.

@jpenilla jpenilla merged commit 8efe28d into master Feb 20, 2024
@jpenilla jpenilla deleted the extends-suggestion-iterable branch February 20, 2024 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants