summaryrefslogtreecommitdiff
path: root/src/bindings.rs
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2022-07-11 10:28:54 +0300
committerLars Wirzenius <liw@liw.fi>2022-07-30 10:14:53 +0300
commit7af18792fa7e783f391910836c2615f6d590b992 (patch)
tree4be2a0a63b6b8615b0bd8200c36301b899f48912 /src/bindings.rs
parent60b5a9a313bec0a6e475f9c16380977ed1c7eafb (diff)
downloadsubplot-7af18792fa7e783f391910836c2615f6d590b992.tar.gz
chore: handle write! errors
Sponsored-by: author
Diffstat (limited to 'src/bindings.rs')
-rw-r--r--src/bindings.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bindings.rs b/src/bindings.rs
index b596c84..8c33cc4 100644
--- a/src/bindings.rs
+++ b/src/bindings.rs
@@ -853,7 +853,7 @@ fn regex_from_simple_pattern(
}
};
- write!(r, r"(?P<{}>{})", name, kind.regex_str()).unwrap();
+ write!(r, r"(?P<{}>{})", name, kind.regex_str()).map_err(SubplotError::StringFormat)?;
end = m.end();
}
let after = &pattern[end..];