aboutsummaryrefslogtreecommitdiff
path: root/font/src/darwin
diff options
context:
space:
mode:
authorCole Helbling <cole.e.helbling@outlook.com>2020-01-16 16:59:27 -0800
committerKirill Chibisov <contact@kchibisov.com>2020-01-17 03:59:27 +0300
commit091296828a351b22564a760a8b322b165c03fd2b (patch)
tree177eef6d9d365df46b155a4b60b562694a027b16 /font/src/darwin
parent3203d2b3fa53cbab0cb3cda1ce53ba28c24482ee (diff)
downloadalacritty-091296828a351b22564a760a8b322b165c03fd2b.tar.gz
alacritty-091296828a351b22564a760a8b322b165c03fd2b.zip
Replace `.nth(0)` with `.next()`
Clippy[1] says that `.next()` is more readable than `.nth(0)`. [1]: https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero
Diffstat (limited to 'font/src/darwin')
-rw-r--r--font/src/darwin/mod.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/font/src/darwin/mod.rs b/font/src/darwin/mod.rs
index 2914b0b5..b9266a84 100644
--- a/font/src/darwin/mod.rs
+++ b/font/src/darwin/mod.rs
@@ -338,8 +338,7 @@ impl Descriptor {
let fallbacks = if load_fallbacks {
descriptors_for_family("Menlo")
.into_iter()
- .filter(|d| d.font_name == "Menlo-Regular")
- .nth(0)
+ .find(|d| d.font_name == "Menlo-Regular")
.map(|descriptor| {
let menlo = ct_new_from_descriptor(&descriptor.ct_descriptor, size);