aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/mozart-spdx-licenses/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/mozart-spdx-licenses/src')
-rw-r--r--crates/mozart-spdx-licenses/src/lib.rs15
1 files changed, 5 insertions, 10 deletions
diff --git a/crates/mozart-spdx-licenses/src/lib.rs b/crates/mozart-spdx-licenses/src/lib.rs
index 04dce27..81fa329 100644
--- a/crates/mozart-spdx-licenses/src/lib.rs
+++ b/crates/mozart-spdx-licenses/src/lib.rs
@@ -164,11 +164,7 @@ struct Parser<'a> {
impl<'a> Parser<'a> {
fn new(input: &'a str, db: &'a SpdxLicenses) -> Self {
let tokens = Self::tokenize(input);
- Self {
- tokens,
- pos: 0,
- db,
- }
+ Self { tokens, pos: 0, db }
}
fn tokenize(input: &str) -> Vec<&str> {
@@ -332,7 +328,9 @@ impl<'a> Parser<'a> {
/// Check that a string matches `[a-zA-Z0-9.-]+`.
fn is_valid_idstring(s: &str) -> bool {
- !s.is_empty() && s.bytes().all(|b| b.is_ascii_alphanumeric() || b == b'.' || b == b'-')
+ !s.is_empty()
+ && s.bytes()
+ .all(|b| b.is_ascii_alphanumeric() || b == b'.' || b == b'-')
}
#[cfg(test)]
@@ -451,10 +449,7 @@ mod tests {
#[test]
fn name_lookup() {
let db = spdx();
- assert_eq!(
- db.get_identifier_by_name("MIT License"),
- Some("MIT")
- );
+ assert_eq!(db.get_identifier_by_name("MIT License"), Some("MIT"));
}
#[test]