No "first()" method on Iterator

As far as I can tell looking at the docs, there is no "first" method for the Iterator trait, but I believe "next" accomplishes getting the first item in this instance.
This commit is contained in:
Chris Boyce 2021-09-25 11:45:31 -07:00 committed by GitHub
parent 1181245916
commit bb32dbdb52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -80,7 +80,7 @@ let adapter = instance
// Check if this adapter supports our surface // Check if this adapter supports our surface
surface.get_preferred_format(&adapter).is_some() surface.get_preferred_format(&adapter).is_some()
}) })
.first() .next()
.unwrap() .unwrap()
``` ```