Skip to content

Commit e3e8c3a

Browse files
committed
FIx clippy
1 parent 9542a37 commit e3e8c3a

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

casr/tests/tests.rs

-1
Original file line numberDiff line numberDiff line change
@@ -4896,7 +4896,6 @@ fn test_casr_lua() {
48964896
}
48974897
}
48984898

4899-
49004899
#[test]
49014900
#[cfg(target_arch = "x86_64")]
49024901
fn test_casr_js() {

libcasr/src/lua.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,9 @@ pub struct LuaException {
1616
impl LuaException {
1717
/// Create new `LuaException` instance from stream
1818
pub fn new(stream: &str) -> Option<Self> {
19-
let re = Regex::new(r#"\S+: .+\n\s*stack traceback:\n(?:.*\n)*\s+\[C\]: (?:in|at) .+"#)
20-
.unwrap();
21-
let Some(mat) = re.find(stream) else {
22-
return None;
23-
};
19+
let re =
20+
Regex::new(r#"\S+: .+\n\s*stack traceback:\n(?:.*\n)*\s+\[C\]: (?:in|at) .+"#).unwrap();
21+
let mat = re.find(stream)?;
2422
Some(LuaException {
2523
message: mat.as_str().to_string(),
2624
})

0 commit comments

Comments
 (0)