-
Notifications
You must be signed in to change notification settings - Fork 531
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
base: main
Are you sure you want to change the base?
Update panic.rs #6585
Conversation
Added the documentation method
There was a problem hiding this 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: complete! all files reviewed, all discussions resolved (waiting on @GradleD)
There was a problem hiding this 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(),
)
}
There was a problem hiding this 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)
There was a problem hiding this 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
There was a problem hiding this 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.
Added the documentation method