Skip to content

Commit

Permalink
FIx clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
hkctkuy committed Nov 29, 2024
1 parent 9542a37 commit e3e8c3a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
1 change: 0 additions & 1 deletion casr/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4896,7 +4896,6 @@ fn test_casr_lua() {
}
}


#[test]
#[cfg(target_arch = "x86_64")]
fn test_casr_js() {
Expand Down
8 changes: 3 additions & 5 deletions libcasr/src/lua.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@ pub struct LuaException {
impl LuaException {
/// Create new `LuaException` instance from stream
pub fn new(stream: &str) -> Option<Self> {
let re = Regex::new(r#"\S+: .+\n\s*stack traceback:\n(?:.*\n)*\s+\[C\]: (?:in|at) .+"#)
.unwrap();
let Some(mat) = re.find(stream) else {
return None;
};
let re =
Regex::new(r#"\S+: .+\n\s*stack traceback:\n(?:.*\n)*\s+\[C\]: (?:in|at) .+"#).unwrap();
let mat = re.find(stream)?;
Some(LuaException {
message: mat.as_str().to_string(),
})
Expand Down

0 comments on commit e3e8c3a

Please sign in to comment.