Add comment about false positive clippy lint

This commit is contained in:
Johann Hemmann 2024-01-19 16:55:45 +01:00
parent 1fdf3063d0
commit 4087dcf1db

View file

@ -252,6 +252,7 @@ where
{
/// Ensures a value is in the entry by inserting the default value if empty, and returns a mutable reference
/// to the value in the entry.
// BUG this clippy lint is a false positive
#[allow(clippy::unwrap_or_default)]
pub fn or_default(self) -> &'a mut V {
self.or_insert_with(Default::default)