diff options
| author | Max Audron <me@audron.dev> | 2026-02-21 14:35:01 +0100 |
|---|---|---|
| committer | Max Audron <me@audron.dev> | 2026-02-21 14:35:01 +0100 |
| commit | f42ef4bec6d1c63c0d8564cfb06e996666dedbe3 (patch) | |
| tree | e526bf4cae5ecf798469acc157b14122d4a5e25a /src/primitive/stringlist.rs | |
| parent | replace all match_variant instances with try_into (diff) | |
clean up clippy lints
Diffstat (limited to '')
| -rw-r--r-- | src/primitive/stringlist.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/primitive/stringlist.rs b/src/primitive/stringlist.rs index 292557f..c4ce733 100644 --- a/src/primitive/stringlist.rs +++ b/src/primitive/stringlist.rs @@ -24,7 +24,7 @@ impl Serialize for StringList { res.extend(x.serialize()?); } - return Ok(res); + Ok(res) } } @@ -43,7 +43,7 @@ impl Deserialize for StringList { } } - return Ok((pos, res)); + Ok((pos, res)) } } @@ -70,8 +70,7 @@ pub fn string_list_deserialize() { 0, 0, 0, 1, 0, 0, 0, 20, 0, 67, 0, 111, 0, 110, 0, 102, 0, 105, 0, 103, 0, 117, 0, 114, 0, 101, 0, 100, 0, 0, 0, 1, ]; - let mut test_list = StringList::new(); - test_list.push("Configured".to_string()); + let test_list = vec!["Configured".to_string()]; let (len, res) = StringList::parse(test_bytes).unwrap(); assert_eq!(len, 28); assert_eq!(test_list, res); |
