diff --git a/src/parser/table.rs b/src/parser/table.rs index 506ba519..b05edfb6 100644 --- a/src/parser/table.rs +++ b/src/parser/table.rs @@ -31,7 +31,7 @@ const ARRAY_TABLE_CLOSE: &[u8] = b"]]"; toml_parser!(std_table, parser, { ( between(byte(STD_TABLE_OPEN), byte(STD_TABLE_CLOSE), key()), - line_trailing().and_then(|t| std::str::from_utf8(t)), + line_trailing().and_then(std::str::from_utf8), ) .and_then(|(h, t)| parser.borrow_mut().deref_mut().on_std_header(h, t)) }); @@ -42,7 +42,7 @@ toml_parser!(std_table, parser, { toml_parser!(array_table, parser, { ( between(range(ARRAY_TABLE_OPEN), range(ARRAY_TABLE_CLOSE), key()), - line_trailing().and_then(|t| std::str::from_utf8(t)), + line_trailing().and_then(std::str::from_utf8), ) .and_then(|(h, t)| parser.borrow_mut().deref_mut().on_array_header(h, t)) }); diff --git a/tests/easy_encoder.rs b/tests/easy_encoder.rs index 47c3e170..01849072 100644 --- a/tests/easy_encoder.rs +++ b/tests/easy_encoder.rs @@ -82,5 +82,5 @@ fn from_table( fn from_array( decoded: &[toml_test_harness::Decoded], ) -> Result { - decoded.iter().map(|v| from_decoded(v)).collect() + decoded.iter().map(from_decoded).collect() } diff --git a/tests/encoder.rs b/tests/encoder.rs index 99bc0271..172d348f 100644 --- a/tests/encoder.rs +++ b/tests/encoder.rs @@ -106,5 +106,5 @@ fn from_table( fn from_array( decoded: &[toml_test_harness::Decoded], ) -> Result { - decoded.iter().map(|v| from_decoded(v)).collect() + decoded.iter().map(from_decoded).collect() }