diff options
author | Lia Lenckowski <lialenck@protonmail.com> | 2024-11-27 19:42:13 +0100 |
---|---|---|
committer | Lia Lenckowski <lialenck@protonmail.com> | 2024-11-27 19:42:37 +0100 |
commit | 33bb3cf8651b07b0c15f8bba63b2dc2f51a4e0e1 (patch) | |
tree | cea438fab19f322931840f46a2f895337fade1f1 | |
parent | b9c831bc5f0de64f2c334347750149d047a10caa (diff) | |
download | embeddings-sort-33bb3cf8651b07b0c15f8bba63b2dc2f51a4e0e1.tar embeddings-sort-33bb3cf8651b07b0c15f8bba63b2dc2f51a4e0e1.tar.bz2 embeddings-sort-33bb3cf8651b07b0c15f8bba63b2dc2f51a4e0e1.tar.zst |
stable rust compatibility
-rw-r--r-- | Cargo.toml | 2 | ||||
-rw-r--r-- | src/main.rs | 6 |
2 files changed, 3 insertions, 5 deletions
@@ -1,6 +1,6 @@ [package] name = "embeddings-sort" -version = "0.3.0" +version = "0.3.1" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/main.rs b/src/main.rs index 0318210..2e63dd8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,3 @@ -#![feature(iterator_try_collect)] - use anyhow::{anyhow, Result}; use clap::Parser; use sha2::{Digest, Sha512_256}; @@ -111,7 +109,7 @@ where let tree = typed_sled::Tree::<[u8; 32], E::Embedding>::open(&db, E::NAME); // find cached embeddings - let mut embeds: Vec<_> = args + let mut embeds = args .images .iter() .map(|path| { @@ -119,7 +117,7 @@ where let r: Result<Option<E::Embedding>> = tree.get(&h).map_err(|e| e.into()); r }) - .try_collect()?; + .collect::<Result<Vec<_>>>()?; // find indices of missing embeddings let missing_embeds_indices: Vec<_> = embeds |