mirror of
https://github.com/allankoechke/turso.git
synced 2026-11-30 11:12:58 +00:00
macros: Replace unwrap() with expect() in generate_get_description()
This commit is contained in:
@@ -132,7 +132,7 @@ fn generate_get_description(
|
||||
}
|
||||
|
||||
let enum_impl = format!(
|
||||
"impl {enum_name} {{
|
||||
"impl {enum_name} {{
|
||||
pub fn get_description(&self) -> Option<&str> {{
|
||||
match self {{
|
||||
{all_enum_arms}
|
||||
@@ -140,7 +140,9 @@ fn generate_get_description(
|
||||
}}
|
||||
}}"
|
||||
);
|
||||
enum_impl.parse().unwrap()
|
||||
enum_impl
|
||||
.parse()
|
||||
.expect("generated code should be valid Rust")
|
||||
}
|
||||
|
||||
/// Register your extension with 'core' by providing the relevant functions
|
||||
|
||||
Reference in New Issue
Block a user