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

Update panic.rs #6585

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Update panic.rs #6585

wants to merge 3 commits into from

Conversation

GradleD
Copy link

@GradleD GradleD commented Nov 5, 2024

Added the documentation method

Added the documentation method
@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @GradleD)

@orizi orizi enabled auto-merge November 7, 2024 08:35
Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @GradleD)


crates/cairo-lang-semantic/src/inline_macros/panic.rs line 140 at r1 (raw file):

         arguments that will be formatted into the message. If no arguments are provided, \
         a default panic message is used."
    }

please locally build before sending PRs.

Suggestion:

     
    /// Returns the documentation for the panic macro.
    fn documentation(&self) -> Option<String> {
        Some(
            indoc! {r#"
            Panics with an optional formatted message.

            # Examples
            ```cairo
            panic!(); // Panics with a default message.
            panic!(\"hello\"); // Panics with "hello".
            panic!("value {}", 1); // Panics with "value 1".
            let world: ByteArray = "world"; 
            panic!("hello {world_ba}"); // Prints "hello world".
            ```
        "#}
            .to_string(),
        )
    }

Copy link
Author

@GradleD GradleD left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @GradleD)

Copy link
Author

@GradleD GradleD left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @orizi)


crates/cairo-lang-semantic/src/inline_macros/panic.rs line 140 at r1 (raw file):

Previously, orizi wrote…

please locally build before sending PRs.

Locally build done

Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @GradleD)


crates/cairo-lang-semantic/src/inline_macros/panic.rs line 140 at r1 (raw file):

Previously, GradleD (Darshan Chauhan) wrote…

Locally build done

please don't respond without pushing your changes.

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