Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix syntax errors in println! and bail! macros #260

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hexcow
Copy link

@hexcow hexcow commented Mar 7, 2025

I’ve corrected a syntax issue with variable interpolation in the println! and bail! macros. The issue was that curly braces {} were missing around variables in the strings, which caused compilation errors.

I’ve updated the code to follow the standard Rust syntax for string interpolation, ensuring it compiles correctly now.

Here's what was changed:

  • println!("⚠️ Skipping link to excluded host: {link}");println!("⚠️ Skipping link to excluded host: {}", link);
  • bail!("❌ Link \"{link}\" is broken (status code: {})", response.status());bail!("❌ Link \"{}\" is broken (status code: {})", link, response.status());

Now the code should compile without any issues.

Copy link

vercel bot commented Mar 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
cosmwasm-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 7, 2025 11:05am

@hexcow hexcow changed the title **Topic: Fix syntax errors in println! and bail! macros** **Description:** I’ve corrected a syntax issue with variable interpolation in the println! and bail! macros. The issue was that curly braces {} were missing around variables in the strings, which caused compilation errors. I’ve updated the code to follow the standard Rust syntax for string interpolation, ensuring it compiles correctly now. Here's what was changed: - println!("⚠️ Skipping link to excluded host: {link}");println!("⚠️ Skipping link to excluded host: {}", link); - bail!("❌ Link \"{link}\" is broken (status code: {})", response.status());bail!("❌ Link \"{}\" is broken (status code: {})", link, response.status()); Now the code should compile without any issues.fix: fix syntax errors in println! and bail! macros fix: fix syntax errors in println! and bail! macros Mar 7, 2025
@DariuszDepta
Copy link
Member

Hi @hexcow, thanks for contributing this improvement.
Just being curious, which Rust version/channel should be used to reproduce this error?
I am using:
stable-x86_64-unknown-linux-gnu unchanged - rustc 1.85.0 (4d91de4e4 2025-02-17)
and it compiles perfectly:

$ /CosmWasm/docs/link-inspector$ cargo build
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.06s

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