Skip to content

Conversation

@aoikurokawa
Copy link
Collaborator

No description provided.

@aoikurokawa aoikurokawa requested a review from Copilot November 9, 2025 03:07
@aoikurokawa aoikurokawa marked this pull request as ready for review November 9, 2025 03:08
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new example demonstrating how to use the BAM API client to fetch validators, along with the necessary tokio runtime features to support async examples.

  • Added examples/validators.rs to demonstrate the get_validators() API method
  • Updated Cargo.toml to include tokio features required for async examples (macros, rt-multi-thread)
  • Updated Cargo.lock with the tokio-macros dependency

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
examples/validators.rs New example file demonstrating validator fetching functionality
Cargo.toml Added tokio features (macros, rt-multi-thread) to support async examples with #[tokio::main]
Cargo.lock Automatically updated to include tokio-macros dependency required by new tokio features

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


#[tokio::main]
async fn main() {
let config = Config::custom("base_url");
Copy link

Copilot AI Nov 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example uses a placeholder string "base_url" instead of an actual URL. This will likely cause runtime errors when the example is run. Consider using a valid example URL (e.g., "https://api.example.com") or adding a comment explaining that users should replace this with their actual API base URL.

Suggested change
let config = Config::custom("base_url");
// Replace "https://api.example.com" with your actual API base URL if needed.
let config = Config::custom("https://api.example.com");

Copilot uses AI. Check for mistakes.
@aoikurokawa aoikurokawa merged commit 07415cb into master Nov 9, 2025
10 checks passed
@aoikurokawa aoikurokawa deleted the ak/example branch November 9, 2025 03:10
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.

2 participants